Hi,
all my backup is created and stored with %date% folders so today backup is in folder 2016-12-12, I would create batch file to compress folder only with todays date, I have created something like this but this not work:
FOR /D %%i IN (C:\backup\%date%) DO "c:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 -sdel -x!*.7z "%%i.7z" "%%i\"
could you help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"this not work" is no helpful error message and your batch issue is totally unrelated to 7z. If you want to iterate over every folder under "C:\backup\%date%" (I simply guess that - your description did not make it clear what you want) then you have to issue such a DIR likewise:
C:\backup\%date%\*
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
all my backup is created and stored with %date% folders so today backup is in folder 2016-12-12, I would create batch file to compress folder only with todays date, I have created something like this but this not work:
FOR /D %%i IN (C:\backup\%date%) DO "c:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 -sdel -x!*.7z "%%i.7z" "%%i\"
could you help me?
"this not work" is no helpful error message and your batch issue is totally unrelated to 7z. If you want to iterate over every folder under "C:\backup\%date%" (I simply guess that - your description did not make it clear what you want) then you have to issue such a DIR likewise: