Command A - add to an archive


Add specified files and folders to an archive. This is a command line equivalent of the command Add.

Note: because archive volume modification is disabled, this command cannot be used to update an archive volume, only to create one.

Examples

  1. add all *.hlp files from the current folder to the archive help.rar

WinRAR a help *.hlp

  1. archive all files from the current folder and subfolders to 362000 bytes size solid, self-extracting volumes save.part1.exe, save.part2.rar, save.part3.rar, …, and add the recovery record to each volume

WinRAR a -r -v362 -s -sfx -rr save

because no file names are specified, all files (*) are assumed.

  1. as a special exception, if folder name is specified as an argument and if folder name does not include file masks and trailing backslashes, the entire contents of the folder and all sub-folders will be added to the archive even if switch -r is not specified.

The following command will add all files from the folder Bitmaps and its subfolders to the RAR archive Pictures.rar:

WinRAR a Pictures.rar Bitmaps

  1. if folder name includes file masks or trailing backslashes, normal rules apply and you need to specify switch -r to process its subfolders.

The following command will add all files from the folder Bitmaps, but not from its subfolders, because switch -r is not specified:

WinRAR a Pictures.rar Bitmaps\*

See also: