I am trying to create batch file and couldn't find solution anywhere on the web.
I would like to archive (Winrar) folder&subfolders (eg.Folder A
in C:\Temp\A
). Folder A
has a bunch of subfolders & files.
I am using this command :
"C:\Program Files\WinRAR\WinRAR.exe" a -esh -m5 -mt2 -r -s -t "ZZZZ.rar"
Problem is that I would like archive to be named same as the name of the main folder (in this case folder "A" - A.rar
), and archive to be send to folder C:\Temp
(up one level).
I don't have WinRAR, so I can't check the syntax for the rar command, but you could create a batchfile (backup.bat) like:
And invoke it with
from the temp folder. That might be a start...