What would be the easiest way of zipping/raring/arjing a directory with a timestamp for a name?
On the console you can do
rar a -r "backup-%DATE%.rar" "C:\Path\To\Directory"
If you also want the the time in the archive name, things get more complicated since
%TIME% usually contains characters illegal for a file name (like
:). To remove the colons form
%TIME%, you could use some wired
FOR /F "tokens=1,2,3 delims=:" %i IN ("%TIME%") DO ( rar a -r "backup-%DATE%-%i.%j.%k.rar" "C:\Path\To\Directory" )
for /? for details on what this does.)
Assuming you want a quick Explorer-based pointy-clicky solution, here's the way I'd use:
- First, for quick zipping, use WinZip's Add To Zip Explorer context menu option on the folder.
- Then, use Synesis Software's Shell Extensions Date Renamer context menu option on the resulting zip archive:
I would imagine there are other solutions that are equally short but use different shell extensions.