Does XP have a command line compression utility?

Does XP have a command line compression (zipping) utility?

I’ve used WinZip Pro in the past, but I don’t have a registered copy. I’m surprised that XP offers a nice little compression utility, but doesn’t seem to have a command line option to use it.

Are there any other free command line zipping utilities that you would give a nod to?

At the command prompt, you would use the COMPACT command. Type HELP COMPACT for syntax and switches.

From a quick glance at the help, it looks like you’d use this to alter the local drive’s compression settings for a given directory rather than to make .zip files. Or am I misreading it?

I thought that Compress was the utility for compressing files and directories in an NTFS file system. What I’m looking for is a command line zipping and unzipping utility, which (I thought) was something else. Currently I can right click on a file >> Send To >> Compressed (Zipped) Folder. I want to be able to do that with a command line interface.

I’m off to run a test of compress on a zipped folder. I’ll let you know how it goes.

If that doesn’t do what you want it to, you can also still get the PKZIP and PKUNZIP command line utilities that originally spawned WinZip from here, if you want to compress them into proper ZIP format.

OK, first of all change the word compress with Compact where necessary.

second, I may be using it incorrectly, but I don’t think Compact is for zipping and unzipping files.

Sweeeeet! I think this is going to have to do.

Thanks, Q.E.D.

Actually, it looks like that site only has PKUNZIP available. Both of them are available here.

be aware of a limitation with PKZip and PKunzip : they only work with short file names of 8 characters or less. (Like the original DOS computers pre-1995.)

PKZip will not properly work with a file whose name is longer than 8 letters .
pkUNnzip will successfully open an archive that was zipped with, say Winzip, and whose file names were long–but the opened file will be truncated to an 8-letter name.

Excellent point. In that case, there’s also PicoZipCL, a freeware utility with a similar interface which, as far as I can tell, does support long filenames. Note that in order to use it:

If you like the command line, I highly recommend Cygwin. This provides a Unix-like command-line interface running under Windows, with lots of the standard Unix utilities, scripting languages, etc. For file archiving and compression you can choose among tar, zip, compress, gzip, and bzip2 at least.

7-Zip

A second vote for 7-Zip. It does everything WinZip does and more. It has a powerful command-line interface, it handles a good range of file formats, and it’s totally free – no nag screens.

PKZIP v2.5 03-01-1999 certainly understands and stores long file names

PKUNZIP ® FAST! Extract Utility Version 2.50 03-01-1999
Copr. 1989-1999 PKWARE Inc. All Rights Reserved. Shareware Version
PKUNZIP Reg. U.S. Pat. and Tm. Off.

_ Pentium class CPU detected.
_ XMS version 3.00 detected.
_ DPMI version 0.90 detected.

Searching ZIP: tt.ZIP

Length Method Size Ratio Date Time CRC-32 Attr Name


  4  Stored       4   0%  17-01-2007  09:28  8bc21544 --wa  testtesttest.test

  4               4   0%                                          1