Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to get Winzips command line wzzip.exe to zip a single folder

Posted on 2007-08-08
2
Medium Priority
?
5,379 Views
Last Modified: 2013-12-01
Hi there,
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

Backup\Backup.zip
MySQL\v5_0_45\mysqldump.exe
MySQL\v5_0_45\mysql.exe
Backup.bat
Backup.sql
Test.txt
MyStuff.txt

I run the Backup.bat file which backs up the database to Backup.sql and then runs wzzip.exe to compress the files into:
Backup\Backup.zip

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 :
    MySQL\v5_0_45\mysqldump.exe
    MySQL\v5_0_45\mysql.exe
    Backup.sql

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 :
    v5_0_45\mysqldump.exe
    v5_0_45\mysql.exe
    Backup.sql

Note that the base MySQL folder is missing.

But if I try :
wzzip.exe -ex -p -r .\Backup\Backup.zip *.sql .\MySQ*

I get :
MySQL\v5_0_45\mysqldump.exe
MySQL\v5_0_45\mysql.exe
Backup.sql
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?
0
Comment
Question by:SoLost
2 Comments
 
LVL 58

Accepted Solution

by:
amit_g earned 2000 total points
ID: 19658716
Use -P instead of -p in your original command.
0
 
LVL 5

Author Comment

by:SoLost
ID: 19658838
Unbelievable how simple that was!

Thanks!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back when OPSMGR 2012 was released we were very excited about getting it into our environment and upgrading our 2007 implementation,  we started our planning and we then proceeded with our implementation. All went as planned & our system …
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question