Command A - add to an archive

Previous  Top  Next


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:

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


WinRAR a help *.hlp


b) 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 a recovery record to each volume

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


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


c) if a folder name is specified as an argument in combination with switch -r, the entire contents of the folder and all sub-folders will be added to the archive. The following command will add all files from the folder Bitmaps to the RAR archive Pictures:


WinRAR a -r Pictures.rar Bitmaps

Of course it is still possible to use the normal format and write Bitmaps\*.* instead of Bitmaps.