I'm trying to zip every file in a directory but I can't seem to get it to use the directory or the old file name. It needs to delete the old file so that it's protected in the zip file.
This is what I came up with so far:
$files = Get-ChildItem "D:Backuptestinput*" |
ForEach ($filename in $files) {
$content = Get-Content $_.FullName
& "C:Program FilesWinRARRar.exe" a -m0 -hps8Cs7y7RfLjYgYb -k -df $filename.rar
}
برچسب:
نویسنده: استخدام کار