Click or drag to resize
DigitalRunePack

The command-line tool Pack.exe can be used to pack files and directories into a single package. The resulting file uses the ZIP format and can be read with standard ZIP tools.

This topic contains the following sections:

Usage

Pack <files> [/directory <directory>] [/recursive] /output <package> [/password <password>] [/encryption (ZipCrypto|Aes256)] [/test] [/help]

If no package exists at the target location, a new file is created.

When the package already exists, it is updated. The input files are compared with the packaged files. New files are added, modified files are updated, and missing files are removed from the package. Files are compared by checking the "Last Modified" time and the file size.

Arguments

The following arguments can be specified on the command-line:

Argument

Description

files

The files and directories to add to the package. The specified files and directories are relative to the current working copy or the base directory, which can be specified with /directory.

Wildcards ('?', '*') are supported.

/directory directory

/d directory

The base directory where to search for files.

/recursive

/r

Recursively add subdirectories to package.

/output package

/o package

The package (file name incl. path) to create or update.

/password password

/p password

Encrypt the package with a password.

/encryption method

/e method

The encryption method to use in case a password is set. The default encryption method is ZipCrypto.

Allowed values: ZipCrypto, Aes256

/test

/t

Make a test run without creating/updating the actual package.

/help

/h

/?

Show help information.

Switches need to be preceded by "/". Alternatively, switches can be preceded by "--" (long form) or "-" (short form). The following arguments are equivalent:

/help
/h
--help
-h
Examples

Show the command-line help:

pack /help
pack /h
pack /?

Pack all files in the folder Content (inkl. subfolders) into a package called Assets.zip:

pack /output "Assets.zip" /recursive /directory "Content" *.*
pack /o "Assets.zip" /r /d "Content" *.*

When wildcards (such as *.*) are used, the path relative to the current directory or the base directory (/directory) is stored in the package. When no wildcards are used, the files are added to the package directly without path information.

Pack specified files directly to a package called Package.pak:

pack /output "Package.pak" "folderA\fileA.txt" "folderB\fileB.txt"