"PKZIP
Command Line 4.0"
Supports long filenames on Windows
95/98/ME and NT/2000/XP
These individual files are here for my personal downloadability. Don't download them... instead get the whole package from PKWare.
pkunzip.exe
pkzip.exe
pkzipc.exe
Readme.txt
To make a zip file:
pkzip -exx -P -r zipfile.zip c:\mydir\*.*
creates zipfile.zip in the current directory
adds all files in the directory c:\mydir\
-exx for maximum compression
-P to store pathnames (above and below current directory),
note that P is UPPERCASE
-r to include subfolders
NOTE! Because of a bug in this version of PKzip, the lowercase -p switch does not work. Instead, the UPPERCASE -P switch must be used, and this stores not only relative paths (paths below the zipped directory), but also absolute paths (paths above the zipped directory). This is not ideal, but it's not a big problem either... and the version of PKzip that fixes this is only available as part of PKSuite. Therefore, when creating a zip file, put the source folder as close to the root of the drive as possible.
To unzip a file:
pkunzip -d zipfile.zip c:\mydir\unzipdir\
unzips zipfile.zip to c:\mydir\unzipdir\
-d to preserve original pathnames
[ click here for an older version that does NOT support long filenames ]