"Add" mode is enabled by using the -a option.

The syntax is like this:

wic arc -a {pckno [-r] [-cdir] filemask...}... [-uexe | -U[+]]

This is slightly complex, but flexible. The parameters are:

arc
The archive name to create or update (default extension is .WPI, unless -u or -U are also used -- see below).
pckno
The package number create or update in the archive. This starts a new package block (the stuff between {...} in the above syntax). This must be specified as a decimal number and match the INDEX attribute of the respective PCK tag in the script.

Whenever WIC encounters a standalone decimal number in the command line, it assumes that the following parameters affect the package with that number (starting a new package block). There must be at least one package block in the command line, but you can specify several to have several packages created at once.

-r
Enables directory recursion for the current package block (and the following filemask).

This can only appear after a pckno has been specified and will only affect that package block, that is, for the next pckno, recursion will be disabled again.

-cdir
Changes to directory dir for the current package block before collecting the files according to filemask. This directory can either be a subdirectory or an absolute path specification (anything that would be valid with the CD command). This is useful for creating archives with several packages from several subdirectories.

This can only appear after a pckno has been specified and will only affect that package block. For each package block, WIC will start from the current directory (which WIC was started from) again. So for each package, dir is considered to be relative to the current directory.

See Examples for more.

filemask
Required. The filemask to collect files with for the current package block. This supports the ? and * wildcards and thus works just like with the DIR command.

This can only appear after a pckno has been specified. There must be at least one filemask per package block, but you can specify several per package, e.g. *.exe *.dll.

-uexe
-U[+]
Optional. This creates a self-installing archive instead of a plain WPI file.