I\'m trying to use 7-Zip to backup some files inside a Powershell (v2) script.
I have:
$zipPath = \"C:\\Program Files\\7-Zip\\7z.exe\"
[Array]$zipArg
If you adapt it correctly: Dont forget the "" on "$Target" and avoid $7zipPath in c:\programm files with a space in the path
Set-Alias 7zip $7zipPath
$Source = "c:\BackupFrom\backMeUp.txt"
$Target = "c:\BackupFolder\backup.zip"
7zip a -mx=9 "$Target" "$Source"
or
7z a "$ArchiveName" -t7z '@listfile.txt'