How to get Winzips command line wzzip.exe to zip a single folder
Posted on 2007-08-08
I am running WinZip Pro v10.0 and using the command line wzzip.exe add on to perform archiving of data for backup purposes in a batch file.
Lets say I have the following folder structure
I run the Backup.bat file which backs up the database to Backup.sql and then runs wzzip.exe to compress the files into:
I am trying to add the .sql file as well as the MySQL folder to the Backup\Backup.zip
So that the contents of the .zip file are :
I have tried the following :
wzzip.exe -ex -p -r .\Backup\Backup.zip *.sql Mysql
wzzip.exe -ex -p -r .\Backup\Backup.zip *.sql .\Mysql
wzzip.exe -ex -p -r .\Backup\Backup.zip *.sql .\Mysql\
But the contents are always :
Note that the base MySQL folder is missing.
But if I try :
wzzip.exe -ex -p -r .\Backup\Backup.zip *.sql .\MySQ*
I get :
MyStuff.txt <--- I don't want this
Which achieves what I want but I also get the additional "MyStuff.txt"
How can I specify in the command line so that I just get the MySQL folder and it's contents while retaining the original MySQL folder?