I am struggling to archive file using PowerShell command with winrar
Folder has some text files N:\Download
: abc.txt, xyz.txt
i would like to get output: N:\Download
: abc.rar, xyz.rar and delete the text file after archive.
and how can I set the compressed level maximum?
https://documentation.help/WinRAR/HELPSwM.htm
here is my sample script
$Source = get-ChildItem -path N:\Download -filter "*.txt"
$Rarfile = "C:\Program Files\WinRAR\WinRAR.exe"
$Dest = "N:\Download"
&$WinRar a $Source.Fullname $Dest