Creating and extracting archives from the command line
Accomplish archive tasks quickly or automatically without using the interface. CuteZIP's command line support lets you use CuteZIP’s features from within batch files and other situations .
If you want to create an ACE, ARJ or other 3rd party compression format, you should use their command line interface.
Compression Parameters
-c = compress - signifies "Create archive" as opposed to "Extract archive."
-p = password - If you specify a password, you must have encrypted archive or self-extracting encrypted archive set as a default in CuteZIP.
archive name file extension - CuteZIP will use the extension of the archive name you choose as the archive type. However, extensions such as .EXE can have different options. An EXE can be a self-extracting archive or a self-extracting encrypted archive. You can choose the definition of EXE by setting SFX or Encrypted SFX as the default under CuteZIP’s settings (the same applies for ZIP). Valid extensions are: ZIP, CAB, EXE, TAR, TAR.GZ, TGZ, PAK and PK3.
Compression Syntax
[path to cutezip.exe] -c -p[optional password] [new archive name.extension] [source file or folder]
Compression Examples
Creating a ZIP archive
c:\progra~1\global~1\CuteZIP\cutezip.exe -c c:\archive.zip c:\mydocu~1\
This will create an archive called archive.zip in the root of the c: drive consisting of all the files and folders in c:\mydocu~1.
Creating an encrypted ZIP archive.
When creating a encrypted archive, CuteZIP relies on settings in the program as well as parameters in the command line. You must have CuteZIP’s default settings set to create an encrypted ZIP.
To create an encrypted ZIP archive from the command line:
- Start CuteZIP.
- Choose Edit > Settings from the Menu bar.
- Choose Compress Options.
- Choose the Encrypted Zip from the Create new archive as: box.
- Choose Twofish or PKZIP compatible compression.
- Click the Apply button.
- Click OK.
- Close CuteZIP.
- Execute the following command:
c:\progra~1\global~1\CuteZIP\cutezip.exe -c -p12345 c:\archive.zip c:\mydocu~1\
This will create an encrypted archive called archive.zip, with 12345 for the password, in the root of the c: drive consisting of all the files and folders in c:\mydocu~1.
Creating a self-extracting encrypted ZIP archive.
When creating a self-extracting encrypted archive, CuteZIP relies on settings in the program as well as parameters in the command line. You must have CuteZIP’s default settings set to create a self-extracting encrypted ZIP archive.
To create a self-extracting encrypted ZIP archive from the command line:
- Start CuteZIP.
- Choose Edit > Settings from the menu bar.
- Choose Compress Options.
- Choose the SFX Encrypted Zip from the Create new archive as: box.
- Choose Twofish or PKZIP compatible compression.
- Click the Apply button.
- Click OK.
- Close CuteZIP.
- Execute the following command:
c:\progra~1\global~1\CuteZIP\cutezip.exe -c -p12345 c:\archive.exe c:\mydocu~1\
This will create a self-extracting encrypted archive called archive.exe, with 12345 for the password, in the root of the c: drive consisting of all the files and folders in c:\mydocu~1.
Extraction Parameters
-x = extract
-p = password
Extract Syntax
[path to cutezip.exe] -x -p[optional password] [archive name] [destination path or filter]
Extraction Examples
Extracting a ZIP file
c:\progra~1\global~1\CuteZIP\cutezip.exe -x c:\archive.zip c:\extract\
This will extract all the contents of the archive called archive.zip to c:\extract.
Extracting files from a ZIP archive using a filter
c:\progra~1\global~1\CuteZIP\cutezip.exe -x c:\mydocu~1\archive.zip cute*
This will extract only the items in the c:\ mydocu~1\archive.zip that match the filter “cute*” to c:\ mydocu~1.
Extracting an encrypted ZIP archive
c:\progra~1\global~1\CuteZIP\cutezip.exe -x -p12345 c:\archive.zip c:\extract\
This will provide the password 12345 and extract the contents of the encrypted archive called archive.zip to the folder c:\extract.
Extracting a self-extracting encrypted archive
[path to self-extracting archive] [password] [optional path]
c:\archive.exe 12345 c:\test
This will extract the contents of the encrypted self-extracting file called archive.exe using the password 12345 into the folder c:\test.