Search:     Advanced search

How to create individual Zip files for each file in a folder using WinZip Command Line Support Add-on

Article ID: 169
Last updated: 20 Jul, 2012
Views: 30296

To have WinZip Command Line Support Add-On create individual Zip files of each file in a folder, open a Command Prompt window and change directories (CD) to the folder where the files to be zipped are located.

You can then enter the following two lines in the Command Prompt window:

path=%path%;"c:\program files\winzip"
for %f in (*.txt) do wzzip %~nf.zip %f

Or enter the following two lines in a batch file:

path=%path%;"c:\program files\winzip"
for %%f in (*.txt) do wzzip %%~nf.zip %%f

If your filenames include spaces you will need to enclose the 2nd, 3rd, and 4th variable in quotes. For the example using the Command Prompt window it would now look like this:

path=%path%;"c:\program files\winzip"
for %f in ("*.txt") do wzzip "%~nf.zip" "%f"

If you have trouble with or questions about this please email Technical Support.

This article was:   Helpful | Not Helpful
Prev   Next
How to extract gzip and tar files on the command line using GNU...     What is a command line interface?

RSS