Other Free Tools zip - Create Zip Files v1.0

zip - Create Zip Files v1.0 2023-10-12

Download zip (0.1 MB)

This is a zip compression tool that is simply wrapped with zlib libraries and does not rely on other third-party DLLs.

Command Line

zip [file1] ... [filen] [dir1] ... [dirn] -s -v:file -o:[zip file=""]
  -s      include subdir/subfiles
  -v:file read file version, used to replace output file
Example:
  zip demo.exe demo -o:demo.zip
  zip demo.exe demo -v:demo.exe -o:demo_%d.%d.zip

For the file path in the zip, use a similar method as WinRAR -EP1: Switch -EP1 - exclude base folder from names That is, after removing the parent directory of the input file, the remaining part is used as the path in the zip.
For example, suppose c:\foo\ has:

    a.cb
    b.cb    
    +demo
       c.cb

c:\foo\a.cb      => a.cb
c:\foo\*.cb      => a.cb
                    b.cb
                    demo/c.cb
c:\foo           => foo/a.cb
                    foo/b.cb
                    foo/demo/c.cb

-o: Specify the zip output file name after it, or use unname to .zip if not specified
the output file name can contain *? Wildcards, such as:
  c:\foo*.bat will add .bat files under c:\foo,
  c:\foo\??.txt will add all 2 letters under c:\foo

Example

// Compress the zipdemo and subdirectories into the demo .zip
zip.exe zipdemo -s -o:demo.zip