Adding to a windows zip file without zip.exe

René Berber
Wed May 16 20:31:00 GMT 2007

Chadwick wrote:

> Cygwin is currently installed on over a hundred windows 2003 servers, and is
> used to do some admin tasks as well as to pull files from the servers on a
> daily basis via ssh.  One of the files pulled from each server is a windows
> ZIP file.
> I want to add an extra file to this ZIP file using a script.  I looked at
> both DOS batch scripts and cygwin shell scripts but have run into problems
> because the cygwin installed on these boxes doesnt contain ZIP.exe, and the
> PKZIP.exe I would used with a batch script is so old it only accepts 8.3
> filenames.
> Updating the servers with new cygwin or command line packages is not an
> option at this point.
> Any suggestions?

Use java, specifically `jar` which is just a fancy unzip-then-call-java thingy, 
and it also does just work as zip (with tar like use).

Just do:

jar -h
jar -tvf
jar -cvf files...

Remember to use only DOS/Windows paths.
René Berber

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list