Link to home
Start Free TrialLog in
Avatar of lsbrown1
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.
Avatar of pabma
pabma
Flag of United Kingdom of Great Britain and Northern Ireland image

Not the best specification I've seen, but hey! :-)

Are the files across multiple directories, or all in a single directory?
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lsbrown1
lsbrown1

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