lsbrown1
asked on
7zip batch script
I'm looking for a 7zip batch script to archive .pdf and .txt files in one archive with a .zip extension.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is the code I was using but Im getting errors: (1) its saving files in c:\Program Files\7-Zip, I want it to save .zip in c:\Inetpub\ftproot\xxxxxxx ( c:\Inetpub\ftproot\xxxxxxx is also where the .pdf and .txt files I want to zip is located) (2) its not giving me the date stamp
cd c:\Program Files\7-Zip
7z.exe a -tzip xx_xxxxx_`date +%Y%m%d`.zip c:\Inetpub\ftproot\xxxxxxx \*.pdf *.txt
cd c:\Program Files\7-Zip
7z.exe a -tzip xx_xxxxx_`date +%Y%m%d`.zip c:\Inetpub\ftproot\xxxxxxx
Are the files across multiple directories, or all in a single directory?