Question

How do I compress a directory with Rar.exe to (todays date).rar with use of a dos batch file? Or do I need to use another file compression program?

Ty

Edit: Ive tried using %date:~10,4%%date:~7,2%%date:~4,2% as filename but it only works sometimes.

Was it helpful?

Solution

Try this command: rar.exe a -ag+YYYYMMDD arc {FolderName}

OTHER TIPS

Here is the command:

c:\path\to\rar\program\rar a C:\path\to\archive\backup.rar *.*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top