How to substitute the cyclic value of foreach into copyhere ()

A script for

powershell handles the output of the file name in the
folder as txt, loop txt to compress the file name into copyhere
but $_, path+$_,$name=path\ $_ and then replace it with $name. It doesn"t work all over,

.
Get-Content $text | Foreach-Object { 
    
    $zipPack.CopyHere("")
    
}

there is less information from searching keywords on the Internet. I don"t know if there is any great advice in this respect. Thank you.

Dec.05,2021
Menu