Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a 7zip command line process that zips by date and its works well. The command creates a zip file with date IE 20121019.zip. However Id like to add a string to the file name. for example 20121019_PRIMARY.zip.

Here is my current command

"c:\Program Files\7-Zip\7z.exe" a
 X:\Logs\HS\%date:~10,4%%date:~4,2%%date:~7,2%\* -xr!*.zip
share|improve this question

1 Answer 1

Can't you just use

c:\Program Files\7-Zip\7z.exe" a x:\Logs\HS\%date:~10,4%%date:~4,2%%date:~7,2%\%date:~10,4%%date:~4,2%%date:~7,2%_PRIMARY.zip X:\Logs\HS\%date:~10,4%%date:~4,2%%date:~7,2%* -xr!*.zip

instead, or have I missed something?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.