What is WinRAR

WinRAR is Windows version of the RAR archiver - a powerful tool which allows you to create, manage and control archive files. There are several versions of RAR, for a number of operating environments: Windows, Linux,FreeBSD, Mac OS X.

There are two versions of RAR for Windows:

  • Version with graphical user interface - WinRAR.exe;
  • Command line console (text mode) version - Rar.exe.

WinRAR and WinRAR self-extracting modules require Windows XP or later.

WinRAR features

  • Complete support of RAR and ZIP 2.0 archives;
  • Highly sophisticated, original compression algorithm;
  • Special algorithms optimized for text, audio, graphics, 32-bit and 64-bit Intel executables compression;
  • Shell interface including drag-and-drop facility and wizard;
  • Command line interface;
  • Non RAR archives (7Z, ACE, ARJ, BZ2, CAB, GZ, ISO, JAR, LZH, TAR, UUE, XZ, Z) management;
  • Solid archiving, which can raise compression ratio by 10% - 50% over more common methods, particularly when packing a large number of small, similar files;
  • Multivolume archives;
  • Creation of self-extracting archives (also multivolume) using the default or optional SFX modules;
  • Recovering physically damaged archives;
  • Recovery volumes allowing to reconstruct missing parts of multivolume archives.
  • Unicode support in file names;
  • Other service functions, such as encryption, archive comments , error logging, etc.


WinRAR limitations

Internal format of RAR and ZIP archives created by WinRAR allows to store practically any number of files of practically any size. Actual limits depend on the file system and available memory. Some older file systems do not support files larger than 4 GB.

WinRAR allocates memory to store name and attributes of every archiving file. If quick open information is added, twice more memory is required to store file name and attributes. While concrete amount depends on a file name length in UTF-8 encoding, typically we can just add several hundred bytes per file to memory required for compression dictionary to estimate memory use when archiving. Also please take into account that 32 bit WinRAR cannot use more than 2 GB of memory. If you need to process a lot of files or use large dictionaries, 64 bit WinRAR may be preferable.

Maximum file encryption password length is 127 characters. Longer passwords are truncated to this length.


Console RAR version

Additionally to WinRAR you can find the file rar.exe in the distributive. This is also RAR version for Windows, but it supports only the command line text mode interface. This console RAR version is convenient, when you need to call RAR from BAT and CMD files or to use it at the command prompt. It supports a larger number of command line switches and commands comparing to WinRAR. Though common aspects of the command line WinRAR syntax considered in Command line interface chapter are also true for console RAR, this help file does not contain descriptions of those switches and commands, which are supported only by the console version. Please read rar.txt file for a detailed description of all console RAR features.


Acknowledgments

We want to thank Ron Dwight, who did so much for RAR and its users. It is so sad that Ron will never see next WinRAR versions.

WinRAR incorporates the code by Info-ZIP group, which is used to handle ZIP archives.

Text compression algorithm is based on Dmitry Shkarin PPMII and Dmitry Subbotin carryless rangecoder public domain source code. You may find it in ftp.elf.stuba.sk/pub/pc/pack.

WinRAR encryption includes parts of code from Szymon Stefanek and Brian Gladman AES implementations also as Steve Reid SHA-1 source.

WinRAR uses CRC32 function based on Intel Slicing-by-8 algorithm.

RAR archives may optionally include BLAKE2sp hash, designed by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn and Christian Winnerlein.

Useful hints provided by Alexander Khoroshev and Bulat Ziganshin allowed to significantly improve RAR compression and speed.

7z archives are decompressed using 7zxa.dll library copyrighted by Igor Pavlov, developer of 7-Zip archiver. 7zxa.dll is distributed under GNU Lesser General Public License (LGPL) version 2.1 or later. You can modify portions of 7zxa.dll and perform reverse engineering solely for purpose of debugging such 7zxa.dll modifications according to LGPL. XZ and LZMA ZIP archives are decompressed using the public domain LZMA SDK by Igor Pavlov. 7zxa.dll library source code and LZMA SDK are available on www.7-zip.org.

We used "Screaming Fast Galois Field Arithmetic Using Intel SIMD Instructions" paper by James S. Plank, Kevin M. Greenan and Ethan L. Miller to improve Reed-Solomon coding performance. Also we are grateful to Artem Drobanov and Bulat Ziganshin for samples and ideas allowed to make Reed-Solomon coding more efficient.

ACE archives are decompressed using unacev2.dll library, which is provided by developers of WinAce - www.winace.com.

Francesco Indrio <om-studio@tiscali.it>, <omstudio@mail15.com> designed most of WinRAR graphics.

The idea of WinRAR shell extension was inspired by Ylian Saint-Hilaire and his nice "RAR shell extension" program.

Special thanks to Andrey Spasibozhko for help in development and promotion of early RAR versions.


Quick start

Shell and command line modes

WinRAR may be used in one of two ways: in graphical shell mode with a standard Windows interface or in command line mode. To start the WinRAR shell simply double-click on the WinRAR icon. Then you can use buttons and menus for archiving and extracting. Read the topics below for step-by-step instructions.

  • How to extract files using WinRAR shell mode
  • How to archive files using WinRAR shell mode

To use WinRAR in the command line mode it is necessary to open, in the Start menu, either "Programs/Accessories/Command Prompt" or "Run…" window and enter the command text. You can find examples of simple commands for archiving and extracting in the topics below, but a more detailed description of the command line mode is given in the Command line mode help topic. Note that if you run WinRAR from the command line without parameters, the shell mode will be activated.

  • How to extract files using the command line mode
  • How to archive files using the command line mode

If you did not disable "Integrate WinRAR into shell" option when installing WinRAR, it is also possible to extract and archive files directly in Windows shell (Explorer or Desktop). Details may be found below.

  • How to extract files in Explorer or Desktop
  • How to archive files in Explorer or Desktop


Quick start: extracting files using WinRAR shell mode

In order to extract files using WinRAR shell mode you must first open the required archive in WinRAR. This may be achieved in one of several ways:

  • double-click or press Enter on the archive name in Windows shell (Explorer or Desktop). If WinRAR was associated with archives during installation (the default installation option), an archive will be opened in WinRAR. You also may associate WinRAR with archives after installation using Integration settings dialog;
  • double-click or press Enter on the archive name in WinRAR window;
  • drag-and-drop an archive to the WinRAR icon or window. Before doing this ensure that WinRAR does not already display another archive, otherwise the dropped archive will be added to the currently displayed archive;
  • run WinRAR from the command line with a single parameter - the archive name.

When an archive is opened in WinRAR, its contents are displayed. Select files and folders, which should be extracted. You may do this using Shift + arrow keys or Shift + left mouse button as in Windows Explorer and other Windows programs. Also in WinRAR it is possible to select files using Space or Ins keys. "Gray +" and "Gray -" keys on the numeric keypad allow the selection of groups of files using file masks.

Having selected one or more files, click the Extract To button at the top of the WinRAR window or press Alt+E , enter the destination folder in the dialog box and click on OK. This dialog box also offers a few advanced options (see Extraction path and options dialog for more information).

During the extraction process, a window will be displayed showing operation statistics. If you wish to break the extraction process, click on the Cancel button in the command window. You may press the "Background" button in this window to minimize WinRAR to the tray. If the extraction is completed without errors, WinRAR will return to the shell, in case of an error, a Diagnostic message window will be displayed.


Quick start: extracting files from the command line

Common command line syntax to extract files with full paths:

WinRAR X [ -switches ] <Archive> [ Files ] [ @File lists ] [ Destination folder\ ]

To extract files, ignoring paths:

WinRAR E [ -switches ] <Archive> [ Files ] [ @File lists ] [ Destination folder\ ]

For example if you wish extract the file LETTER.TXT to the current folder from the archive LETTERS.RAR, use the following command:

WinRAR X LETTERS.RAR LETTER.TXT

Archive extension is optional and may be omitted.

The next command extracts all *.WAV files from the archive Songs to the folder Audio:

WinRAR X Songs *.WAV Audio\

It is also possible to list the files to be extracted in a file, rather than listing them in the command line. In this case the name of text file, containing the list of files to be extracted, must be given in the command line. This is indicated by placing the symbol @ before this file name. Thus, you can create a file Binaries, containing the strings *.exe and *.com and execute the command:

WinRAR X TOOLS @Binaries

to extract all files with EXE and COM extensions from the archive TOOLS to the current folder.

Window containing statistics is displayed during the extraction process. If you wish to break extraction, click on "Cancel" button in the command window. You may press "Background" button in this window to minimize WinRAR to the tray. If extraction is completed without problems, WinRAR terminates. Diagnostic message window is displayed in case of error.

See Command-line interface for detailed commands and switches description.


Quick start: extracting files in Explorer or Desktop

If you did not disable the "Integrate WinRAR into shell" option when installing WinRAR, it is possible to extract files directly in a Windows shell. Press the right mouse button on archive icon, select "Extract files…" command, enter the destination folder in the dialog box and click the "OK" button. This dialog box offers a few advanced options (see Extraction path and options dialog for more information).

You may also select the "Extract to <folder name>" command to extract to the proposed folder name without additional requests or "Extract Here" to extract to the current folder.

Note that if option "Cascaded context menus" in Integration settings dialog is switched on, you need to open "WinRAR" submenu to access to described above commands. Otherwise they reside in the top level menu.

Another method is to drag one or several archives using the right mouse button and drop them to the destination folder and then select "Extract Here" in the menu which will appear.


Quick start: archiving files from the shell

Quick start: archiving files from the WinRAR shell

First, you need to run WinRAR. Double-click or press Enter on the WinRAR icon. You can also start it from the Windows "Start menu": enter "Programs" then "WinRAR" and then run the "WinRAR" item.

When WinRAR is running, it displays a list of files and folders in the current folder. You need to go to the folder, which contains files to archive. You may use Ctrl+D, the disks list below the toolbar or click on the small disk icon in the bottom left corner, to change the current disk. Press BS, Ctrl+PgUp, small "Up" button below the toolbar or double-click on the folder named ".." to go to the parent folder. Press Enter, Ctrl+PgDn or double-click on any other folder to enter that folder. Ctrl+\ will set the root disk or archive folder as the current folder.

When you have entered the folder with the desired files, select the files and folders, which you are going to archive. This may be achieved by using Shift + arrow keys or the mouse as in Windows Explorer and other Windows programs. It is also possible, in WinRAR, to select files using Space or Ins keys. "Gray +" and "Gray -" keys on the numeric keypad allow the selection of groups of files using file masks.

Having selected one or more files, click on the Add button at the top of the WinRAR window, press Alt+A or select the "Add files to archive" command in the Commands menu. Enter the destination archive name in the dialog box which appears or simply accept the default name. You may select, in this dialog, the format of the new archive ( RAR or ZIP), compression level, volume size and other archiving parameters. This dialog described in details in Archive name and parameters dialog topic. Click on the OK button when you are ready to create the archive.

During the archiving process, a window will be displayed showing operation statistics. If you wish to break the archiving process, click on the Cancel button in the command window. You may press the "Background" button in this window to minimize WinRAR to the tray. When archiving is completed, the command window disappears and the newly created archive becomes the currently selected file.

It is also possible to add files, to an existing RAR archive, using drag-and-drop. Select the desired archive in the WinRAR window and press Enter (or double click) on its name. RAR will read the archive and display its contents. You may now add files to the archive by simply dragging them from another program and dropping to WinRAR.


Quick start: archiving files from the command line

The common command line syntax for archiving files is:

WinRAR A [ -switches ] <Archive> [ Files ] [ @File lists ]

For example, if you wish add the file LETTER.TXT to the archive LETTERS.RAR, type:

WinRAR A LETTERS.RAR LETTER.TXT

If an archive extension is not specified, WinRAR will use the default archive format selected in the default compression profile, but you may override it by specifying either .RAR or .ZIP extension.

The next example: add all *.WAV files to the solid RAR archive Songs:

WinRAR A -S Songs.RAR *.WAV

It is also possible to list the files to be archived in a file, rather than listing them in the command line. In this case the name of text file, containing the list of files to be archived, must be given in the command line. This is indicated by placing the symbol @ before this file name. Thus, you can create a file Binaries, containing the strings *.exe and *.com and execute the command:

WinRAR A TOOLS.ZIP @Binaries

to add all files with .EXE and .COM extensions from the current folder to ZIP archive TOOLS.

Window containing statistics is displayed during the archiving process. If you wish to break archiving, click on "Cancel" button in the command window. You may press "Background" button in this window to minimize WinRAR to the tray. If archiving is completed without problems, WinRAR terminates. Diagnostic message window is displayed in case of error.

See Command-line interface for detailed descriptions of commands and switches.


Quick start: archiving files in Explorer or Desktop

If you did not disable the "Integrate WinRAR into shell" option when installing WinRAR, it is possible to archive files directly in a Windows shell. Select the files you are going to compress, in Explorer or Desktop, press the right mouse button on the selected files and choose "Add to archive…". Enter the destination archive name in the dialog box which appears or accept the default name. You may also select the format of the new archive (RAR or ZIP), compression level, volume size and other archiving parameters. This dialog is described in detail in the Archive name and parameters dialog topic. Click on the OK button when done. An archive will be created in the same folder as the selected files.

You may also select the "Add to <archive name> archive" command to add to the proposed archive without additional requests. In this case compression settings selected in the default compression profile will be used.

Note that if the option "Cascaded context menus" in Integration settings dialog is switched on, you need to open "WinRAR" submenu to access to described above commands. Otherwise they are resided in the top level menu.

Another method is to drag file icons to an existing archive icon and drop them. Files will be added to this archive.


RAR versus ZIP

WinRAR is able to create archives in two different formats: RAR and ZIP. Here is a comparison of these formats:

ZIP archives

The main advantage of ZIP format is its popularity. For example, most archives on Internet are ZIP archives. So if you are going to send an archive to somebody, but you are not sure that your addressee has WinRAR to extract the archive contents, it might be a good idea to use the ZIP format. Though, you may also send a self-extracting archive. Such archives are slightly larger, but can be extracted without external programs.

Another ZIP advantage is speed. ZIP archives are usually created faster than RAR.

RAR archives

Typically RAR format provides better compression than ZIP, especially in the solid mode. WinRAR multi-volume archives in RAR format allow more functions like self-extracting volumes.

RAR format has also a few important features missing in ZIP, such as the recovery record allowing to reconstruct damaged data and locking important archives to prevent their accidental modification.

Both RAR and ZIP formats are able to handle files of practically unlimited size (up to 8,589,934,591 GB).


RAR 5.0 archive format

WinRAR 5.0 introduces a new verson of RAR archive format.

New features of RAR 5.0 format include:

  • Compression dictionary size up to 1 GB. When compressing big files, especially in solid mode, larger dictionary frequently allows to achieve a higher compression ratio.
  • Encryption based on AES-256 algorithm, which is theoretically stronger than RAR 4.x AES-128.
  • Recovery record using Reed-Solomon error correction codes with much higher resistance to multiple damages comparing to RAR 4.x recovery record.
  • Faster recovery volume operations. Maximum number of RAR+REV volumes in RAR 5.0 is 65535 instead of 255.
  • File times stored as Coordinated Universal Time (UTC) instead of RAR 4.x local time, making file exchange among several time zones more straightforward.
  • Optional BLAKE2sp checksums for file data. Unlike CRC32 checksum, it is practically impossible for BLAKE2 to have two different files with the same checksum value. So BLAKE2 can be used for file identification purpose.
  • Optional quick open information can be added to archive to provide a faster access to archive contents.
  • Multithreading support in decompression algorithm. Its speed benefit is more noticeable on large files with poorly compressible data or with BLAKE2 checksums.
  • Support for NTFS reparse points, symbolic links, hard links.
  • Possibility to store second and following copies of identical files as references to first copy of such file.
  • Complete Unicode awareness. File names and comments are stored in UTF-8 format.

Some obsolete or inefficient RAR 4.x features are not included in RAR 5.0 format:

  • Special algorithms including text compression, raw audio and true color compression, Itanium executable compression, cannot be used in RAR 5.0 archives. Those formats of raw audio and true color data, which were recognized by older RAR versions, become significantly less widespread. Text compression performance on modern multi-core CPUs is too low comparing to general compression. Even though these algorithms are not supported in RAR 5.0, latest WinRAR can decompress any 4.x RAR archives, including those using mentioned above algorithms. RAR 5.0 still includes Intel IA-32 executable and delta compression algorithms, which are efficient for modern data and hardware.
  • Creating old style volume names in archive.r00, archive.r01 format is not supported. Main purpose of these names was compatibility with MS DOS file system. But such naming convention does not work well with platforms like Windows, where file extensions are used to define file types and associations.

Older applications including older WinRAR versions are not able to recognize RAR 5.0 archives. So if you wish to be sure that archive can be decompressed by older software, you may prefer to select RAR 4.x archiving format. It can be done either in Archive name and parameters dialog or with -ma command line switch. Also RAR 4.x may be preferable if you need special text or multimedia compression algorithms or old style volume naming scheme.


Support of other archive formats

Additionally to complete support of RAR and ZIP WinRAR provides basic operations for 7Z, ACE, ARJ, BZ2, CAB, GZ, ISO, JAR, LZH, TAR, UUE, XZ, Z files created by other tools: view contents, extract files, show comments and archive information. You do not need to have any external programs to handle these formats.


Solid archives

Solid archive is an archive packed with a special compression method, which treats several or all files within the archive as one continuous data stream. WinRAR supports solid mode only in RAR archiving format, ZIP archives are always non-solid. Use Create solid archive option in archiving dialog or -s command line switch to enable solid archiving.

Solid archiving significantly increases compression when adding a large number of small, similar files. But it also has a few important disadvantages:

  • slower updating of existing solid archives;
  • to extract a single file from a solid archive all preceding files must be analyzed. This makes extraction from the middle of a solid archive slower than extraction from a normal archive, but, if all files are to be extracted from a solid archive, the extraction speed will not be affected.
  • if any file in a solid archive is damaged, it will be impossible to extract all files which follow the damaged area. Thus if a solid archive is stored to a potentially unreliable media, it is recommended to make use of the recovery record.

Solid archiving is preferable if:

  • the archive is updated rarely;
  • it is not necessary to frequently extract a single file or only part of the files from the archive;
  • compression ratio is more important than compression speed.

Usually files in a solid archive are sorted by extension. But it is possible to disable sorting with -ds switch or set an alternative file order using a special file, rarfiles.lst.

Volumes and self-extracting archives (SFX) may also be solid.

See also: switch -s, switch -ds, rarfiles.lst


Volumes (split archives)

WinRAR can create an archive consisting of several files. Such archive is called multivolume and individual files composing this archive are known as volumes. Generally volumes are used to store large data amounts on removable disks or transfer data by email.

WinRAR can create RAR and ZIP volumes. Another name, widely used for ZIP volumes, is ZIP split files.

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support -vn and extension based names.

RAR volumes can also be solid and self-extracting. First self-extracting volume has a different (i.e. not .rar) file extension, for example, .exe for Windows SFX volumes.

To unpack RAR volumes you need to start extraction from the first volume. If volumes are stored on non-removable media like a hard disk, you need to put all volumes in the same folder before starting extraction.

ZIP volumes have names like 'volname.zip', 'volname.z01', 'volname.z02'. Use a volume with ".zip" file extension in all archive processing operations like starting extraction or opening an archive.

Unlike RAR volumes, ZIP volumes cannot be self-extracting. WinRAR needs to have access to all ZIP volumes of multivolume file set at the same time, when creating or unpacking them. So it is impossible to create or unpack ZIP volumes on removable disks, one volume per disk. You need to create them all in the same folder and then you may copy them manually to removable disks if you need it. Similarly, you need to collect all ZIP volumes in the same folder before starting extraction.

It is impossible to add, update or delete files in already existing volumes. You can create only a new volume set.

Starting from version 3.40, WinRAR stores the volume number inside of RAR volumes. You can see this number at the top of "Show information" dialog if you apply Show information command to volume. This number may be useful if original volume names are lost and you need to restore correct names manually.


Recovery volumes

Recovery volumes or .rev files are special files which can be created by WinRAR and allow to reconstruct missing and damaged files in a volume set. They can be used only with multivolume archives.

This feature may be useful for backups or, for example, when you posted a multivolume archive to a newsgroup and a part of subscribers did not receive some of the files. Reposting recovery volumes instead of usual volumes may reduce the total number of files to repost.

Each recovery volume is able to reconstruct one missing RAR volume. For example, if you have 30 volumes and 3 recovery volumes, you are able to reconstruct any 3 missing volumes. If the number of .rev files is less than the number of missing volumes, reconstructing is impossible. Total number of usual and recovery volumes must not exceed 255 for RAR 4.x and 65535 for RAR 5.0 archive format. Number of recovery volumes must be less than the number of RAR volumes.

Original RAR volumes must not be modified after creating recovery volumes. Recovery algorithm uses data stored both in REV files and in RAR volumes to rebuild missing RAR volumes. So if you modify RAR volumes, for example, lock them, after creating REV files, recovery process will fail.

Additionally to recovery data, RAR 5.0 recovery volumes also store service information such as checksums of protected RAR files. So they are slightly larger than RAR volumes which they protect. If you plan to copy individual RAR and REV files to some removable media, you need to take it into account and specify RAR volume size by a few kilobytes smaller than media size.

WinRAR reconstructs missing and damaged volumes either when clicking on .rev file, or when using rc command or automatically, if it cannot locate the next volume and finds the required number of .rev files when unpacking.

You may use "Recovery volumes" option of Archive name and parameters dialog or the similar option in Protect archive command to create recovery volumes. In the command line mode you may do it with -rv switch or rv command.

Original copies of damaged volumes are renamed to *.bad before reconstruction. For example, volname.part03.rar will be renamed to volname.part03.rar.bad.


Self-extracting (SFX) archives

An SFX (SelF-eXtracting) archive is an archive, merged with an executable module, which is used to extract files from the archive when executed. Thus no external program is necessary to extract the contents of an SFX archive, it is enough to execute it. Nevertheless WinRAR can work with SFX archives as with any other archives, so if you do not want to run a received SFX archive (for example, because of possible viruses), you may use WinRAR to view or extract its contents.

SFX archives usually have .exe extension as any other executable file.

SFX archives are convenient if you want to give an archive to somebody, but do not know, if they have an appropriate archiver to extract files from it. You may also use SFX archives to distribute your own software. For example, WinRAR package is based on GUI RAR SFX module Default.sfx.

To create an SFX archive from the command line you may use the -sfx switch to make a new archive or S command to convert an existing archive to SFX. In WinRAR shell either select "Create SFX archive" option in Archive name and parameters dialog, when creating a new archive or enter into an already existing archive and press "SFX" button.

WinRAR distributive includes several SFX modules. All SFX modules have .sfx extension and must be in the same folder as WinRAR. By default WinRAR always uses Default.sfx module, but you may specify the name of another module directly in "-sfx" switch or "S" command. For example, to convert myarchive.rar to SFX using WinCon.SFX module run:

WinRAR SWinCon.SFX myarchive.rar

In the WinRAR shell you can select the desired SFX module from the list displayed when executing Convert archive to SFX command.

Here you can read about the following SFX modules:

  • GUI RAR and ZIP SFX modules (Default.SFX and Zip.SFX)
  • Console RAR SFX module (WinCon.SFX)


Encryption

Both RAR and ZIP formats support encryption. To encrypt files you need to specify a password before archiving or directly in the Archive name and parameters dialog. In the command line this is done by using switch -p[pwd]. In WinRAR shell, to enter a password you may either press Ctrl+P or select the "Set default password" command in File menu or click on the small icon of a key in the bottom left corner of the WinRAR window. To enter a password in Archive name and parameters dialog press "Set password" button in "Advanced" set of options.

Unlike ZIP, RAR format allows to encrypt not only file data, but also other sensitive archive areas: file names, sizes, attributes, comments and other blocks. If you wish to do it, you need to set "Encrypt file names" option in the password dialog or in the command line mode use the switch -hp[pwd] instead of -p[pwd]. Without a password it is impossible to view even the list of files in archive encrypted in such mode.

Solid RAR archives and archives with encrypted file names can have only one same password for all archived files. Files in non-solid RAR archives without name encryption and in ZIP archives can use different passwords.

Do not forget to remove an entered password, when it is no longer needed, otherwise you may occasionally archive some files using the password without wishing to. To remove a password, enter an empty string instead of a password or close WinRAR and start it again. While a password exists, the icon of key is red, otherwise it will be yellow. Also, when you start an archive operation using a password, title bar of Archive name and parameters dialog flashes twice.

If you enabled "Use for all archives" option in password dialog and entered the empty string as a password, extract and test commands will skip all encrypted files and archives. In this mode the icon of key in WinRAR status bar is not displayed.

You do not need to remove a password if you entered it directly in Archive name and parameters dialog. Unlike other ways such password is valid only for the single archiving operation and automatically removed after its completion.

When extracting encrypted files, it is not necessary to enter the password before starting the operation, though you may do so. If a password was not entered before extraction and WinRAR encounters an encrypted file, the password will be requested from the user.

ZIP 2.0 format supported by WinRAR uses a proprietary encryption algorithm. RAR archives are encrypted with much stronger AES-128 standard for RAR 4.x and AES-256 in CBC mode for RAR 5.0 archives. RAR 5.0 key derivation function is based on PBKDF2 using HMAC-SHA256.

If you need to encrypt sensitive information, it is better to select RAR archive format. For real security use at least 8 character long passwords. Avoid common words in passwords, they make a password weaker. Passwords are case sensitive. Maximum password length is 127 characters. Longer passwords are truncated to this length.

If "Encrypt file names" option is off, file checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm. It is important, because otherwise it could be possible to guess file contents based on a checksum value only, without knowing a password. Such risk would be especially high for short files or for strong BLAKE2 checksum. So do not expect checksums for encrypted RAR 5.0 files to match actual CRC32 or BLAKE2 values. If "Encrypt file names" option is on, checksums are stored without modification, because they can be accessed only after providing a valid password.

Remember that if you lose your password, you will be unable to retrieve the encrypted files, not even the WinRAR author is able to extract encrypted files.


Archive comment

You may add an optional text information to RAR and ZIP archives. This information is called an archive comment. To add it manually in WinRAR shell mode to the already existing archive use Add archive comment command, to read the comment from a file in the command line - command "c" or switch -z<file>.

You also may specify a comment when archiving files directly in the Archive name and parameters dialog.

If an archive, which contains a comment, is opened in WinRAR and the option "Show archive comment" in General settings dialog is on, the comment window will be displayed to the right of the files list. You may change the width of the comment window, dragging its left border with the mouse.


Protecting archives from damage

RAR archive format supports a special type of redundant data called the recovery record. Presence of recovery record makes an archive larger, but allows to repair it even in case of physical data damage due to disk failure or data loss of any other kind, provided that the damage is not too severe. Such damage recovery can be done with Repair archive command. ZIP archive format does not support the recovery record.

Set "Add recovery record" option in Archive name and parameters dialog to add the recovery record to archive. Another approach is to enable "Add recovery record" option in the default compression profile. In this case the recovery record will be added to archives after any archive modification.

If you need to add the recovery record in the command line mode, please read descriptions of rr[N] command and -rr[N] switch, which can be used for this purpose.

RAR 5.0 recovery record uses Reed-Solomon error correction codes. Its ability to repair continuous damage is about the same as for RAR 4.x, allowing to restore slightly less data than recovery record size. But it is significantly more efficient than RAR 4.x record in case of multiple damaged areas.

RAR 4.x recovery record consists of 512 byte sectors and cannot contain more than 524288 sectors. So its useful size and data recovery ability are limited to 256 MB. In case of RAR 5.0 format the recovery record can be as large as archive itself.

You can specify the recovery record size in Advanced options of "Archive name and parameters" dialog as a percent of archive size. Also it can be set in Protect archive command. Larger recovery record allows to restore a larger damaged area, but increases the archive size more and is processed slower. Usually 3 - 10% of archive size is a reasonable choice. Due to service data overhead the actual resulting recovery record size only approximately matches the user defined percent and difference is larger for smaller archives.

To repair a corrupt archive, which includes the recovery record, in WinRAR shell mode apply "Repair" command to it. In the command line use command "r". Repaired archive will have fixed.arcname.rar name, where 'arcname' is the original (damaged) archive name. If corrupt archive does not contain the recovery record or if archive is not completely recovered due to major damage, the second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files, which fail checksum validation, but it is still possible to recover undamaged files, which were inaccessible due to corrupt archive structure. This is useful mostly for non-solid archives. This stage is not performed for archives with encrypted file names, which can be repaired only if recovery record is present.

When the second stage is completed, the reconstructed archive will be saved as rebuilt.arcname.rar, where 'arcname' is the original archive name.

RAR 5.0 recovery record is more resistant to damage of recovery record itself and can utilize a partially corrupt recovery record data. Note, though, that "Repair" command does not fix broken blocks in recovery record. Only file data are corrected. After successful archive repair, you may need to create a new recovery record for saved files.

Both 4.x and 5.0 records are most efficient if data positions in damaged archive are not shifted. If you copy an archive from damaged media using some special software and if you have a choice to fill damaged areas with zeroes or to cut out them from copied file, filling with zeroes or any other value is preferable, because it allows to preserve original data positions. Still, even though it is not an optimal mode, both versions of record attempt to repair data even in case of deletions or insertions of reasonable size, when data positions were shifted. RAR 5.0 recovery record handles deletions and insertions more efficiently than RAR 4.x.


Locking archives

RAR archive format supports archive locking. The locked archive cannot be modified by WinRAR. You may lock important archives to prevent their accidental modification.

Use "Lock archive" command in WinRAR shell mode or command "K" in the command line to lock an archive.


How to choose optimal archiving settings

When creating a new archive, you are presented with several compression related parameters on General options page of "Archive name and parameters" dialog. First you need to select the archive format, which can be RAR, ZIP or RAR5. ZIP is preferable if you are not sure that receiver of your archive has WinRAR or other software able to unpack RAR archives. Otherwise it is recommended to choose RAR, which supports more functions and higher compression. "RAR5" is the latest version of RAR format introduced in WinRAR 5.0. While it includes many important changes like AES-256 encryption, more efficient recovery record, larger dictionary sizes, older software including older WinRAR versions is not able to decompress RAR 5.0 archives. So you need to take compatibility issue into account when selecting RAR5 if you plan to provide created archive to other people.

Regardless of the archive format the next step is selection of compression method. You can choose among "Store", "Fastest", "Fast", "Normal", "Good" and "Best" methods. "Best" provides highest, but slowest compression, "Fastest" compresses poorly, but is very fast, "Store" adds files to archive with maximum possible speed, but without any compression. "Fastest" might be more suitable for daily backups, "Best" for Internet distribution, "Normal" for everyday use like compressing email attachments.

If you selected the ZIP archive format, your preparations are finished at this stage. In case of RAR and RAR5 there are two more important options affecting compression: dictionary size and solid archiving mode.

Compression dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. Larger dictionary frequently improves compression of big files, especially in solid mode, but it also leads to slower compression and higher memory requirements. Normally we recommend to use 4 MB dictionary for RAR format and 32 MB for RAR5 (RAR 5.0) archive format. You can read more about the dictionary size here.

"Create solid archive" option compresses files as single contiguous data stream resulting in higher compression ratio when processing many small similar files. But it also reduces speed of further archive modifications and increases amount of data loss in case of archive damage. This mode is explained in details Solid archives topic.

These are all the main settings, which affect compression ratio and speed. Actually, you do not need to set them before every archiving. Simply select your favorite default values once in the default compression profile, which can be created in Compression settings dialog.


Introduction to WinRAR interface

This topic briefly describes the main elements of the WinRAR interface.

WinRAR has the following menus: File, Commands, Tools, Favorites, Options and Help. Select the appropriate topic to read about commands of a particular menu.

The next interface item is the toolbar. It is placed below menus, but above the file list. Toolbar buttons duplicate items of the Commands menu (note that all items of this menu also have keyboard shortcuts). When WinRAR displays an archive contents, some buttons may be disabled, if corresponding archive management functions are not applicable to the archive. If you wish, you may choose buttons to display, remove buttons text or reduce buttons size using General settings dialog or clicking by the right mouse button on the toolbar.

Below the toolbar buttons you will see the small "Up" button and the disks list. "Up" button changes the current folder to the parent. Disks list is needed to select the current disk or, for example, the network. You may open it either using mouse or pressing F4 key. It is possible to drag "Up" button and the disks list to the right corner of toolbar. Pressing Ctrl+D or clicking the small "Disk" icon on status bar can also be used to change the current disk.

The list of files is located below the toolbar. It may show either the unpacked contents of the current folder or, if WinRAR is entered to an archive, archived files. These are so called file management and archive management modes. For each file the following parameters are shown: name, size, type and modification time. Archived files also have two additional parameters: packed size and checksum. Checksum is a special value calculated based on file data and allowing to detect if archived file was damaged. WinRAR can use either CRC32 or BLAKE2 algorithm to calculate the checksum.

All parameters are organized into columns. By clicking on the column title you may change the files sort order (a blue arrow drawn in the title shows sort direction). Also it is possible to change the width of columns by dragging the column title separators with a mouse. Several additional list options are available in the File list dialog.

If an archived file is encrypted, its name is followed by an asterisk. If a file is continued in a next volume, its name is followed by "-->". If a file is continued from a previous volume, its name is followed by "<--". And if a file is continued both in a next and from a previous volume, its name is followed by "<->".

Before processing files you need to select them in the list. In additionally to the standard Windows methods of selecting files WinRAR provides several more keys for this purpose: Space, Ins, "Gray +", "Gray -". More details will be found in the topic Selecting files.

The following keys may be used to navigate in the file list. Backspace (BS) or Ctrl+PgUp or double-click on the folder with ".." name to go to the parent disk or archive folder. The same action will close an archive, if you are viewing the archive root folder. Press Enter or Ctrl+PgDn or double-click on any other folder to enter to it. The same action applied to an archive name will open this archive. Ctrl+\ sets the root disk or archive folder as the current.

If you press the right mouse button in the files list, the menu containing file management and interface commands will appear. These commands are also accessible in the usual WinRAR menus, toolbar and keyboard, so you may select whichever activation method is most convenient for you.

Left pane of WinRAR window can contain the folder tree panel if it is enabled in "Folder tree" submenu of Options. Folder tree is convenient if you need to navigate in disk or archive folders quickly. You may change the width of folder tree by dragging its right border with the mouse.

Depending upon the "Show archive comment" option in General settings dialog and the presence of a comment in the opened archive, the right part of the file list may be overlapped by the archive comment window. You may change the width of the comment window by dragging its left border with the mouse.

The status bar is placed below the files list, at the bottom of the WinRAR window. The left part of the status bar contains two small icons: "Drive" and "Key". By clicking on the "Drive" icon you may change the current disk. To change the current password click on the "Key" icon. Both of these commands are also present in the File menu. By default the "Key" icon is yellow, but if a password is entered, the icon will be red. The middle part of the status bar shows either the total size of selected files or information about the current operation. The right part of the status bar displays the number and size of files in the current folder.


File management and archive management modes

The WinRAR shell may be in one of two basic states: file management mode or archive management mode.

In the file management mode, a list of files and folders from the current working folder is displayed. You may select these files and folders in the usual Windows fashion, with a mouse or keyboard, and perform different file operations such as archiving or deleting. Also in this mode it is possible to perform test and extract operations with groups of archives.

In the archive management mode, the list of archived files and folders from the currently opened archive is displayed. You also may select files and folders and perform archive specific operations such as extracting, testing or commenting.

In either mode you may change the current folder (real or archived). Press BS, Ctrl+PgUp or double-click on the folder with ".." name to go to the parent disk or archive folder. The same action will close an archive and return WinRAR to file management mode, if you are viewing the archive root folder. Press Enter, Ctrl+PgDn or double-click on any other folder to enter to it. The same action applied to an archive name will open this archive. Ctrl+\ sets the root disk or archive folder as the current.

To enter WinRAR›s file management mode, start WinRAR by simply double-clicking on the WinRAR icon or run WinRAR from the command line with no parameters.

To enter WinRAR›s archive management mode, start WinRAR in the file management mode, place the cursor on the desired archive and press Enter or use the "Open archive" command of File menu. Or simply double-click on the archive name in Windows shell (Explorer or Desktop) to open it in WinRAR, but for this to take effect, WinRAR must have been associated with archives during installation (it is the default installation option). You also may associate WinRAR with archives after installation using Integration settings dialog. And finally, it is also possible to enter directly to the desired archive from the command line, if the archive name is passed to WinRAR in the command line as a single parameter.


Selecting files

Before performing any operation you need to select, in the WinRAR files list, all files and folders which should be processed.

If you need to select only one file, just move the cursor to it and start an operation. There are several methods of file selection. As in other Windows applications you may press arrow keys or the left mouse button while holding Shift key to select a group of files. To select several separate items hold down the Ctrl key and then click each item you want. Press Ctrl+A or use the "Select all" command from File menu to select all the files and folders in the current folder.

All methods described above provide the standard non-persistent selection, which is canceled if you move the cursor. Though the standard methods are usually enough, sometimes it is more convenient to have persistent selection, allowing navigation in the current folder without removing the selection from previously marked files. WinRAR provides several keys for this:

Space, Ins | Select a file under the cursor and move the cursor down. To deselect a file selected using Space or Ins, press Space or Ins on the name again or use "Gray -" command.
Gray * (on numpad) | Invert the current selection
Gray + (on numpad) | Select files according to an entered wildcard mask
Gray - (on numpad) | Deselect files according to an entered wildcard mask

If no files are selected before starting extraction or testing, all archived files will be extracted or tested. This rule is valid only for test and extract operations.


Themes

Interface themes allow to modify the default WinRAR look by replacing it with alternative set of graphics. Themes are distributed as RAR archives having ".theme.rar" file extension. You can download them from "Themes" section of WinRAR home page. To install a new theme, just open the theme file in WinRAR like opening a usual RAR archive, for example, double click on its icon. Then confirm installation in the dialog displayed by WinRAR.

List of installed themes is available in submenu "Themes" of menu Options. Select any list item to activate the corresponding theme. This menu also contains commands "Organize themes…" providing theme management functions and "Get more themes…" loading themes web page.

Theme files are stored in Themes subfolder of %APPDATA%\WinRAR folder.


Wizard interface

WinRAR Wizard interface is designed for novice users and allows to perform basic compression and decompression operations using the simple step by step procedure.

You need to press Wizard button on WinRAR toolbar to display the wizard dialog. By default this button is visible both inside and outside of archives, but you may disable or enable it like other toolbar buttons with "Select buttons…" in General settings dialog. Another option of the same, "General settings" dialog, "Activate Wizard on start", allows to run Wizard every time when WinRAR starts.

Every Wizard dialog contains a brief instruction at the top, describing dialog contents and possible user actions. You may also press Help button to get more detailed instructions.


Wizard: Choose the operation

Here you need to select an operation to perform.

If you wish to unpack contents of RAR, ZIP or other archive, choose "Unpack an archive" option. For example, you need to select it to decompress a file downloaded from Internet.

If you need to create a new archive and place some of your files in compressed format to it, choose "Create a new archive" option. It may be useful to compress files before sending them by email or copying to external disk. It helps to reduce the file size.

If you wish to add files to already existing archive instead of creating a new one, select "Add files to already existing archive" option.

After you have chosen an operation, press "Next" button at the bottom of dialog. If you selected "Create a new archive" or "Add files to already existing archive" option, you will be prompted with "Select files to add" dialog, where you need to select those files, which you wish to compress. In case of "Unpack an archive" you will go directly to the next "Choose the archive" dialog.


Wizard: Choose the archive

Here you need to select an archive to unpack.

Press "Browse" button, locate your archive, put the cursor to its name and press "Open". Also , instead of using "Browse", you may drag the archive icon and drop the icon to this dialog.

After you selected the archive name, press "Next" button at the bottom of dialog.

Note that WinRAR may attempt to guess an archive name and set a name of some existing archive from your Desktop when activating the dialog. If it is really the archive which you wanted to unpack, just press "Next", but if WinRAR guess was wrong, simply select an archive name which you want, as described above.


Wizard: Choose the archive

Here you need to select an archive to create or update.

If you create a new archive, usually WinRAR will propose some name for it. You may either accept this name or enter another. If "Default folder for archives" option in WinRAR settings is not blank, WinRAR will propose to create an archive in this folder. Otherwise the proposed name does not include the path and archive will be created on Desktop. If you wish to create it in another folder, press "Browse" button, find a folder to place the archive, enter an archive name in the "File name" field and press "Open".

If you wish to add files to already existing archive, you may also use "Browse" to locate the archive to update or drag the archive icon and drop the icon to this dialog.

After you selected the archive name, press "Next" button at the bottom of dialog.


Wizard: Choose a folder for unpacked files

Here you need to select a folder to place files extracted from archive.

By default WinRAR proposes to create them in the folder specified as "Default folder for extracted files" in WinRAR settings or on Desktop if this folder is not specified. You may either accept the proposed name or press "Browse" button and choose the folder manually.

After you selected the folder name, press "Finish" button at the bottom of dialog to start the extraction operation.


Wizard: Archiving options

Here you may specify some additional archiving options.

If high archiving speed is more important for you than compression ratio, enable "Faster, but less tight compression".

If you wish to delete files after they had been successfully archived, set "Delete files after archiving".

If you need to create a self-extracting archive, enable "Create self-extracting (.exe) archive" option. Such archive does not need WinRAR to be unpacked, it has exe extension and it is enough to run it (double click on its icon) to unpack its contents.

You can press "Set password…" button and specify a password if you wish to encrypt archiving files. Do not forget your password, it is impossible to unpack encrypted files without it.

Also, if you create a new archive, you may split it to several separate parts (called volumes). Sometimes it may be more convenient to have several files of smaller size than one large file. If you wish to do it, just enter a size of single part in the input field near the bottom of dialog. You can specify the size in bytes, kilobytes, megabytes or gigabytes. Just select an appropriate item in drop down list to the right of volume size field. Decimal fractions are allowed.

If you update an already existing archive, options to create self-extracting archive and to split it to parts are disabled. They are accessible only in case of new archive.

Note that all settings in this dialog are optional, usually you may keep their default values.

When done, press "Finish" button at the bottom of dialog to start the archiving operation.


Viewing files

When you perform a "View file" command, WinRAR shows the contents of the file under the cursor in the internal viewer window regardless of the file contents or configuration settings, but if you were to press Enter on a file name, several different results are possible. If the file under the cursor is an archive, WinRAR will open it and display its contents, otherwise further actions depend upon them settings specified in Viewer settings dialog. With this dialog you may force WinRAR to always use the internal viewer, to open the file in the external viewer, to call a program associated by Windows with this file type or to ask, each time before viewing the file, which action described above should be executed.

WinRAR can be used to view normal files, whether in an archive or not. If an external program is called to view an archived file, WinRAR unpacks this file to a temporary folder, passes its name to the external program and waits for the program to terminate. After this WinRAR tests the file modification time and if it was updated, offers to update this file in the archive and then deletes the temporary folder with the extracted file.

Note that the scheme described above is slightly modified, when Enter is pressed on an archived file, which has .exe extension. In this case WinRAR extracts not only this file, but the complete contents of the archive to the temporary folder and then runs the executable file. The following steps are similar to those described above: WinRAR waits for the executable to terminate, then tests the modification time of the extracted files and if changed or if new files were created, offers to update the archive. The temporary folder and it›s contents are then deleted. This method of processing .exe files allows programs to be run directly from an archive. For example, you may use it to install new programs without unpacking a distributive manually, simply enter to an archive and press Enter on setup.exe or install.exe program.


Internal viewer

Commands of the internal viewer.

Menu/Item | Shortcut | Function
File/Exit | Alt+F4, Ctrl+W | Exit from the internal viewer
Edit/Copy | Ctrl+C | Copy selected text to the clipboard
Edit/Select all | Ctrl+A | Select all viewed text
Edit/Find | Ctrl+F | Find a string in the text
Edit/Find next | F3 | Find the next occurrence of a string
View/View as Windows text | Ctrl+I | Use Windows character table
View/View as DOS text | Ctrl+D | Use DOS character table
View/View as Unicode (UTF-16LE) |  | View text as Unicode in UTF-16 little endian format
View/View as Unicode (UTF-8) |  | View text as Unicode in UTF-8 format
View/Word wrap | Ctrl+S | Switches word wrapping
View/Set Font… |  | Set viewer font
Help/View help | F1 | Show internal viewer help

To change the current character table you may click on the right part of the viewer status bar, where the name of the current table is displayed. The default character table may be specified in Viewer settings dialog.


"Add to archive" command

This command is accessible both in file management and in archive management modes.

When WinRAR browses files on a disk, first, you need to select the files and folders, which are to be archived. Then run "Add to archive" command using either Commands menu, button "Add" on the toolbar or Alt+A keyboard shortcut. Select archive name and parameters in the Archive name and parameters dialog and press Enter to start archiving.

When WinRAR shows archive contents, you need first to run "Add to archive" command, then select files in the appeared dialog and set archive name and parameters as described above.

Command line equivalent: command "a"


"Extract files to the specified folder" command

This command is accessible both in file management and in archive management modes.

In the archive management mode, when WinRAR shows archive contents, first, you need to select archived files and folders, which are to be extracted. Then run "Extract files to the specified folder" command using either Commands menu, "Extract to" button on the toolbar or Alt+E keyboard shortcut. In the Extraction path and options dialog you may specify the destination folder for extracted files and, if necessary, set additional options. After closing this dialog, extraction is started.

In the file management mode it is possible to unpack several archives at once. In general the operation is similar to the described in the previous paragraph, but instead of selecting files inside of archive you need to select archives and folders, where WinRAR should search for archives. If any archives are found, the Extraction path and options dialog will be displayed. After closing this dialog contents of all found archives will be extracted.

Command line equivalent: command "x"


"Test archived files" command

This command is accessible both in file management and in archive management modes.

In the archive management mode, when WinRAR shows archive contents, first, you need to select archived files and folders, which are to be tested. Then run "Test archived files" command using either Commands menu, "Test" button on the toolbar or Alt+T keyboard shortcut.

All errors found during test are displayed in the "Diagnostic messages" window. If no errors detected, WinRAR will display a corresponding message.

In the file management mode it is possible to test several archives at once. In general the operation is similar to the described in the previous paragraph, but instead of selecting files inside of archive you need to select archives and folders, where WinRAR should search for archives. When a search is completed, WinRAR will test contents of all found archives.

Command line equivalent: command "t"


"View file" command

This command is accessible both in file management and in archive management modes. It opens the file under the cursor in the internal viewer. To run this command use either Commands menu , button "View" on toolbar or Alt+V keyboard shortcut.

See also: Internal viewer, Viewing files


"Delete files" command

This command is accessible both in file management and in archive management modes. In file management mode it deletes the selected files and folders to the Recycle Bin, so you have the chance to restore accidentally deleted data. But in archive management mode the selected files and folders are deleted from the archive completely, without any possibility of restoring them later, so you need to be careful here. To run this command use either Commands menu , button "Delete" on the toolbar, Alt+D or Del keyboard shortcuts.

In file management mode you may also completely delete files. Press Shift-Del instead of Del avoid moving files to the recycle bin.

Command line equivalent: command "d"


"Rename file" command

This command allows to rename a file or folder under the cursor and is accessible both in file management and in archive management modes. Renaming files inside of archives is supported for RAR and ZIP formats. To run this command use either Commands menu or F2 keyboard shortcut.

Rename command has some restrictions when working with multivolume archives. Only those files which are contained in the current volume can be renamed. If you wish to rename files in volumes, you need to disable "Merge volume contents" option in the File list settings dialog and open the volume containing required files.

Be careful when choosing a new file name. If it includes characters, which are not supported by file system, you may have problems with extracting the renamed file afterwards. In such situation just rename it again to something more usable.

Command line equivalent: command "rn"


"Print file" command

This command allows to print a file under the cursor and is accessible both in file management and in archive management modes. To run this command use either Commands menu or Ctrl+I keyboard shortcut.


"Extract without confirmation" command

This command is accessible both in file management and in archive management modes. If WinRAR is inside of archive, you need to select archived files and folders, which are to be extracted. If you browse uncompressed files in the file management mode, select files and folders which will be searched for archives to unpack. Then run "Extract without confirmation" command using either Commands menu, "Extract" button on the toolbar or Alt+W keyboard shortcut. The selected files will be extracted to the current folder or to the default folder for extracted files, if it is specified in Compression settings dialog. If you need to set a different destination folder or some additional options, use Extract to the specified folder command instead.

Command line equivalent: command "x"


"Add archive comment" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Add archive comment" command using either Commands menu, "Comment" button on the toolbar or Alt+M keyboard shortcut and enter the archive comment in the appeared dialog. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to comment.

Command line equivalents: command "c", switch -z<file>


"Protect archive from damage" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Protect archive from damage" command using either Commands menu, "Protect" button on the toolbar or Alt+P keyboard shortcut. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to protect.

This command adds a recovery record to the currently opened or selected archives. It may help to repair it later in case of small physical damage of the archive data. This feature is supported only by RAR archives.

If an opened archive is the first file in the multivolume sequence, you may also create recovery volumes for it. Just enter a number of .rev files to create. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes.

Command line equivalent: command "rr", command "rv"


"Lock archive" command

This command is accessible both in file management and in archive management modes. If you are inside of archive, there is no need to select any files, just run "Lock archive" command using either Commands menu, "Lock" button on the toolbar or Alt+L keyboard shortcut. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to lock.

A locked archive cannot be modified by WinRAR. You may lock important archives to prevent accidental modification. This feature is supported only by RAR archives.

Command line equivalent: command "k"


"Scan archive for viruses" command

This command is accessible both in file management and in archive management modes. It unpacks one or several archives to temporary folder and checks contents of this folder with a third party virus scanner, which must be installed on a user's computer. In the archive management mode it processes only the currently opened archive, in the file management mode all archives found in selected files and folders will be processed.

Dialog displayed by this command contains the following fields.

Virus scanners found by WinRAR

List of antivirus software installed on a computer and identified by WinRAR. If this list contains several virus scanners, you may choose anyone which you like. If the list contains only "User defined" item, it means that WinRAR could not find any antivirus software and you need to specify a scanner name and parameters manually.

Virus scanner name

Name of virus scanner executable. You need to modify this field only if WinRAR cannot find antivirus software installed on your computer and "Virus scanners found by WinRAR" list contains only "User defined" item. In such case you need to press "Browse" button and locate a virus scanner .exe file, which will be called by WinRAR to check unpacked files.

Virus scanner parameters

Parameters passed to virus scanner. You need to modify this field either if WinRAR cannot find antivirus software installed on your computer or if it passes invalid parameters to virus scanner. For example, it may happen if command line syntax of antivirus program is changed in a new version. Usually virus scanners require only one parameter - the name of folder containing unpacked files. WinRAR denotes this folder as %f. Since its name may include spaces, it is necessary to enclose it in quotes, so most likely you need to place "%f" string to this field. Though, some scanners may require additional options, which can be found in their documentation.

If you use only one antivirus and do not need to modify its parameters every time, you may skip the virus scanner selection dialog by turning "Propose to select virus scanner" option in Security settings off.

Notes

  1. WinRAR is not able to find viruses itself, it calls antivirus software already installed on your computer. If you do not have such software, you will not be able to use this WinRAR command;
  2. WinRAR does not display any messages after completion of this command. You should read information displayed by virus scanner to check if any viruses had been found;
  3. WinRAR unpacks all selected archives to temporary folder before calling a virus scanner, so your disk must have enough free space to hold all unpacked files. WinRAR deletes these files when scanning is done;
  4. WinRAR is able to detect many popular antivirus programs automatically, so normally you do not need to edit "Virus scanner name" and "Virus scanner parameters" fields manually. Just select a scanner from the list at the top of dialog and press "OK" and use two other fields only if this method does not work;
  5. WinRAR saves parameters of virus scanner started last time and restores them, when you activate this command again.


"Convert archives" command

This command allows to recompress archives from one format to another. It is accessible both in file management and in archive management modes. In the file management mode you may select several files and folders to process, WinRAR will scan them and convert found archives. In the archive management mode only the current archive is converted by default. "Convert archives" dialog contains several items controlling command execution. They are described below.

Archives to convert

List of archives, which will be converted by WinRAR. You may add or remove items of this list using "Add" and "Remove" buttons. "Remove" button does not delete files on the disk, it just removes them from the list to convert.

Contents of archive list depends on the next dialog parameter, list of formats.

Archive types

Here you may choose which archive formats you are going to convert. Archive formats in this list may be followed by the number enclosed in parentheses. It shows how many archives of this type are found and ready to be converted. For example, "zip(12)" means that WinRAR found 12 zip archives. If this number is missing, no archives of this type were found.

Conversion options/Lowest allowed ratio

This option allows to specify the lowest <new packed size>/<old packed size> percent acceptable for converted archives. For example, if you set it to 100, WinRAR will preserve already existing archives, when a new archive is larger than old one. If it is disabled, WinRAR ignores archive sizes.

Conversion options/Compression

"Compression" button activates a dialog, where you may choose different parameters for converted archives. For example, you may select either they will be rar or zip.

Conversion options/Folder for converted archives

Here you may enter a folder to place converted archives. If this field is empty, new archives will be placed in the same folder as old converted files.

Conversion options/Delete original archives

Chooses either to delete successfully converted archives.

If original and new archives have the same format and "Folder for converted archives" field is blank, original archives will be deleted regardless of this option.

Conversion options/Skip encrypted archives

If this option is enabled, archives with encrypted data will not be processed. It might be useful if you wish to run the conversion command in unattended mode, avoiding password prompts. Though, if you know that all encrypted archives use the same password, another approach can be to have this option off and set the default password in File menu before invoking the convert command.

"Save" button

This button stores the state of all dialog controls except "Archives to convert" list, so it will be restored when activating the dialog next time. You may use it to save your favorite conversion settings.

Remarks

  1. WinRAR keeps the new archive only if it was successfully created, tested and reported the total unpacked size of contained files equal to unpacked size of original archive.
  2. WinRAR attempts to preserve archive comments when possible. But if user specified a comment in the dialog activated by "Compression" button, it will have a higher precedence. File comments are not converted. Other special archive information like NTFS streams and file security data may be either converted or not depending on compression settings and archive format.
  3. WinRAR unpacks original archives to temporary folder before converting. You need to have enough free space in this folder.
  4. WinRAR may fail to convert archives containing special data like links or file versions.


"Repair archive" command

This command is accessible both in file management and in archive management modes. It considers selected files or opened archive as corrupt archives and attempts to repair them. To run this command use either Tools menu , "Repair" button on the toolbar or Alt+R keyboard shortcut.

WinRAR is able to repair only RAR and ZIP archives. WinRAR tries to detect the type of the archive automatically using archive data and extension, but user also may set an archive type manually.

The source archive is not changed and result of operation is stored into a new archive, which is named fixed.arcname.rar or rebuilt.arcname.rar, where 'arcname' is the original archive name.

Success of "Repair" operation depends on the archive type and type and size of damaged area. Chance of successful RAR archive repair is significantly higher if it has the recovery record. If archive does not contain the recovery record, chances are lower for solid archives and no repair is possible for archives with encrypted file names.

Technical details of archive repairing are provided in the command "r" description ("r" is the command line equivalent of "Repair archive" command).

Command line equivalent: command "r"


"Convert archive to SFX" command

This command is accessible both in file management and in archive management modes. It converts an archive to self-extracting. If you are inside of archive, there is no need to select any files to perform this operation, just run "Convert archive to SFX" command using either Tools menu, "SFX" button on the toolbar or Alt+X keyboard shortcut and select necessary SFX module from the list. If you browse uncompressed files in the file management mode, first select files and folders which will be searched for archives to convert.

If an archive is already self-extracting, using this command you may also remove an already existing SFX module from archive. In such case WinRAR does not touch the original archive and creates a new archive with the same contents, but without self-extracting module.

If you selected Windows GUI SFX module, which is proposed by default, you may also press "Advanced SFX options…" button to set a number of SFX parameters like the default destination path, a title and window text. Read Advanced SFX options topic to get more information about them.

These topics describe SFX modules provided in the WinRAR package:

  • GUI RAR and ZIP modules (Default.SFX and Zip.SFX)
  • Console RAR module (WinCon.SFX)

Command line equivalent: command "s"


"Find files" command

This command is accessible both in file management and in archive management modes. Using "Find files" dialog it is possible to search for files contained the specified string either in the opened archive or in selected folders or disks. Dialog items are described below.

File name to find

By default it contains "*", what means to check all files. You may enter other file mask here, for example, "*.txt" to search only in .txt files. It is allowed to enter several file masks separated by spaces. If you need to specify a file name containing spaces, enclose it in quotes.

String to find

Here you may enter a string to find. If you leave this field blank, WinRAR will display all files matching other specified criteria.

Match case

Enables case sensitive string comparison.

Use all tables

Use ANSI, Unicode and OEM (MS DOS) character tables when searching for string. If this option is off, WinRAR uses only the default Windows character table (ANSI) in the search operation.

Hexadecimal search

Treat the entered string as sequence of hexadecimal values separated by spaces.

Disks and folders

This field contains list of disks, folders or archive names to search in. Also you may select predefined <Current folder>, <Local hard drives> also as separate disks from the drop down list.

Archive types

Archive types to search in. By default it contains "*", what means "all archive formats", but, for example, you may enter "*.rar" to search data only in rar archives. It is allowed to enter several archive masks separated by spaces. Because of technical limitations WinRAR is not able to search for text in ACE archives, other formats supported by WinRAR are supported here.

"Find in subfolders" option

Forces WinRAR to search not only in the specified folder, but also in its subfolders.

"Find in files" option

If enabled, WinRAR will search in usual not archived files matching the specified file name.

"Find in archives" option

Enables to search in the archived files. You may set both "Find in files" and "Find in archives" to search a desired string both in archives and in usual files.

"Save" button

This button saves the current state of dialog, so it will be automatically restored when activated next time.

Command line equivalent: command "i"


"Show archive information" command

"Show information" command

This command is accessible both when WinRAR is in the file management and in the archive management modes. Just run "Show information" command using either Tools menu, "Info" button on the toolbar or Alt+I keyboard shortcut.

In the file management mode it allows to get the information about contents of selected files and folders: the total size, a number of files and subfolders, a number of archives. To improve the operation speed archives are detected basing only on the file name extension, so self-extracting archives are not counted here. File scanning may take a long enough time, but if you wish you may close the dialog in any moment.

Disk space is allocated to files in fixed size blocks called clusters. For example, if a cluster size is 4096 bytes and you created a file only 1 byte size, in fact it will occupy 4096 bytes. So, to give you a hint, how much space your files are really take and how much you may save after archiving them, the information dialog also displays a cluster size for the current disk, a real size of selected files including not filled tails of clusters and so called "Files slack" - the total space wasted in these cluster tails.

When the file scanning is complete, you may press "Estimate" button to get a prognosis about compression size and time for selected files. This prognosis is based on RAR "Best" compression method supposing that disk is fast and time spent to disk data exchange is small. Compression estimation is performed very quickly and very roughly, so do not expect an exact result here. Though it can show if it is worth spending time to compress selected data. If you set "Start automatically" option, the estimate operation will be initiated automatically, when opening the dialog next time, without necessity to use "Estimate" button.

Also, after completing the scan operation, it is possible to switch to other pages of this dialog and specify different archive options like a comment, recovery record, SFX module, etc. It allows to apply necessary changes to all RAR and ZIP archives contained in the selected folders and files. Unlike the scan step, self-extracting archives are also processed here. Be cautious with this operation, it may change parameters of hundreds and thousands archives at once. Such feature is powerful, but may become rather dangerous when improperly used.

In the archive management mode, when you activate "Show information" either inside of archive or outside of it, but when only one archive is selected, WinRAR will display the following information about the archive:

  • archive name (in the dialog title);
  • archive type (solid, SFX, volume) and format (RAR, ZIP, CAB, ARJ, LZH, etc.). All these parameters are combined in the single string displayed at the top of the dialog.

For RAR volumes created by WinRAR 3.40 or higher this string also includes a volume number. This number may be useful if original volume names are lost and you need to restore correct names manually;

  • minimum archiver version required for extraction. For some archive formats, such as ZIPX, this field may also include a name of compression algorithm;
  • operating system under which the archive was created;
  • the total number of files;
  • the total unpacked and packed files length;
  • the total compression ratio;
  • size of self-extracting module or zero for non-SFX archives;
  • presence of the archive comment ;
  • presence of encrypted files;
  • if archive is locked;
  • size of maximum continuous damaged area, which still can be repaired in the best case using the recovery record, if it is present in the archive;
  • maximum dictionary size used for any file within the archive.

If the archive has an archive comment, an additional dialog sheet containing this comment is displayed.

Like in the file management mode, it is possible to switch to other pages of the dialog and specify different parameters for the current archive. Just press "Help" button in other pages to read more about them.


"Generate report" command

This command is accessible both when WinRAR is in the file management and in the archive management modes.

In the archive management mode this command creates a report containing the complete list of files in the currently opened archive. File selection is ignored.

In the file management mode a report provides information only about selected items. Depending on command parameters, report may include both usual files and contents of archives found in selected items. If you selected a folder, WinRAR will process its files and subfolders as well.

It is possible to modify report style using following parameters.

Write report to file

Here you may enter a file name to store the report. It is allowed to leave this field blank if you do not need to save the report to file.

Send report to printer

Set this option if you wish to print the report.

Copy report to clipboard

Set this option if you wish to copy the report to clipboard. It takes some amount of memory to store data in the clipboard, so be cautious with this option if you expect to produce a multi-megabyte report. It may take too much memory and decrease the operation speed.

Output format (HTML, Unicode text, text)

Select the output format for report file. HTML and Unicode text formats support Unicode, so non-English characters in file and archive names will be displayed properly. Text format is not Unicode compatible and can damage non-English characters.

Sort files by (original order, name, size, packed size, modification time, checksum)

Here you may select the sort mode or set it to Original order to skip sorting.

Sort archives separately

If this option is enabled, contents of every archive included into report will be sorted independently of other archives and files, so all files of the same archive will be placed to the same group. Otherwise all files included into report will be sorted as a single stream ignoring archive borders. This option does not make any difference in the original order sort mode.

Include to report / Archives

This option is available only in the file management mode. If it is enabled, WinRAR analyzes all files and if archive found, its contents is included into report. If you wish to get the list of usual files on your disk and do not care about archive contents, disable this option to speed up the operation.

Include to report / Usual files

This option is available only in the file management mode. If it is enabled, WinRAR will include usual files into report. If you need a report containing only archived files, you should disable this option.

Include to report / Archive name

If enabled, report will include an archive name before every continuous group of files from this archive. You may wish to disable this option only in some special cases, for example, if you need to pass a report to external program.

Include to report / Total information

If enabled, WinRAR will place the information about the total number and size of files at the end of report. If "Usual files" option is enabled, only usual files will be added to total information, otherwise only archived files will be present here. It cannot count both usual and archived files. For files split between volumes the total information calculates only those of them, which start in the current volume. It is done to avoid calculating split files several times, when processing a group of volumes.

Include to report / File size

Include the uncompressed file size into report.

Include to report / Packed size

Include the compressed file size into report. For usual files it may be not equal to uncompressed file size only on NTFS disks and only if file has the attribute "Compressed".

Include to report / File date

Include the file modification date into report. Date format is always YYYY-MM-DD hh:mm, it does not depend on system settings.

Include to report / File checksum

Include the file checksum into report. This option is available for both archived and usual files. Checksum type for archived files depends on archive format and options, for usual files it is always CRC32. Enabling this option for usual files may slow down the operation significantly, because WinRAR will need to read file data and calculate CRC32 for every processed file. Usually archives already store previosuly calcuated checksums, so this option does not introduce any additional delays for archived files.

"Save" button

Using "Save" button you may store default values of all dialog options except a report file name. WinRAR preserves two sets of default values for this command, one for archive and another for file management mode.


"Benchmark" command

Using "Benchmark" command you may compare performance of RAR compression algorithm on different computers.

This command generates random data, which contain specially introduced redundancy increasing load to processor and memory. Then data are passed through RAR compression and decompression algorithms and output of decompression algorithm is compared with source data. If any difference found, WinRAR reports "Errors found - Yes" in the command window. Such errors may indicate hardware problems like unreliable memory. Also WinRAR displays a size of processed data and compression speed, current and resulting, in kilobytes per second. You may use the resulting speed value to compare RAR performance in different conditions. For example, "Benchmark" command may be helpful, when you need to choose a new computer and wish to know which one will compress data faster. Only the general compression algorithm in "Best" mode with 4096K dictionary is called, all additional filters and algorithms are disabled, so it measures performance of core RAR compression on worst case like data.

Using "Multithreading" option you can compare performance of usual single threaded and multithreaded (optimized for multiprocessor architectures) versions of RAR compression algorithm. Depending on results, you can enable or disable multithreading in General settings dialog dialog.

It takes some time to fill the compression dictionary, which is empty in the beginning. Until it is done, the speed value is inconsistent, so the command window starts to display the current speed only a few seconds after activating. Resulting speed is displayed when collected statistics is enough to get an accurate result. After the resulting speed has been set, it is not changed more. Though source data are random, their redundancy level and other parameters are always the same. So this command will report practically the same current speed regardless of execution time, provided that system load is not changing.

It is not guaranteed that different WinRAR versions will report same compression speed values, so if you use this command to compare performance of different computers, ensure that you run the same WinRAR version in all tests. Also it is recommended to close other applications before starting a benchmark.

"Benchmark" command is never finished automatically, you need to cancel it manually. It does not use the hard disk, all operations are performed in memory.


File menu

Command | Shortcut | Function
Open archive | Ctrl+O | Open the specified archive. You may also read about other methods to open an archive.
Save archive copy as... |  | Save a copy of archive opened in WinRAR shell to another folder.
Change drive | Ctrl+D | Change the current drive
Set default password | Ctrl+P | Set the default password. The password must be entered twice to ensure correctness. This password will be used in all archiving and extracting operations.
Copy files to clipboard | Ctrl+C | Copy selected archived or usual files to the clipboard. For example, you may select some files in archive, press Ctrl+C, open a folder in Explorer and press Ctrl+V to unpack selected files to that folder. You may press Ctrl+V in a text editor to paste only file names instead of file contents.
Paste files from clipboard | Ctrl+V | Pasting files to WinRAR initiates the archiving operation, so you may select files in Explorer and paste them to WinRAR to compress them.
Select all | Ctrl+A | Select all files and folders
Select group | Gray + | Select all files and folders corresponding to an entered mask
Deselect group | Gray - | Deselect all files and folders corresponding to an entered mask
Invert selection | Gray * | Invert the selection of all files and folders
Exit | Alt+F4, Ctrl+W | Exit from WinRAR

Depending on "Keep archives history" option in General settings dialog, a few names of recently opened archives can be present below "Exit" command. You may use them to quickly open these archives in WinRAR.


Commands menu

Function | Shortcut
Add files to archive | Alt+A
Extract to the specified folder | Alt+E
Test archived files | Alt+T
View file | Alt+V
Delete files | Del, Shift-Del
Rename file | F2
Print file | Ctrl+I
Extract without confirmation | Alt+W
Add archive comment | Alt+M
Protect archive from damage | Alt+P
Lock archive | Alt+L


Tools menu

Function | Shortcut
Wizard |
Scan archive for viruses | Alt+D
Convert archives | Alt+Q
Repair archive | Alt+R
Convert archive to SFX | Alt+X
Find files | F3
Show information | Alt+I
Generate report | Alt+G
Benchmark | Alt+B


Favorites menu

Favorites menu contains the list of user's favorite folders and archives. You may add the currently opened archive or folder and its description to the list with "Add to favorites…" command, which is also accessible through Ctrl+F keyboard shortcut. Descriptions are optional, if description is available, WinRAR displays it in the menu, otherwise an archive or folder name is displayed.

If you select an archive or folder from the list, it will be open in WinRAR. Note that you may quickly access the first ten favorite items without opening the menu, just press Ctrl+1 … Ctrl+0 keys. Ctrl+1 activates the first favorite item, Ctrl+2 - the second, …, Ctrl+9 - ninth, Ctrl+0 - tenth.

"Organize favorites" command allows to edit and delete favorites as well as to move them up and down in the list. Select desired items and press the corresponding button to perform any of these operations. You may use Del key in addition to the "Delete" button to delete a favorite.


Options menu

Command "Settings…" of this menu activates the dialog containing the following WinRAR settings: General, Compression, Paths, File list, Viewer, Security and Integration. Select any of these topics for details. Keyboard shortcut for "Settings…" command is Ctrl+S.

You can export WinRAR settings to file and import them later using two appropriate commands of "Import/Export" submenu. This file has "Settings.reg" name and by default it is placed in %APPDATA%\WinRAR folder, but you can select another folder in "Save WinRAR settings" or "Load WinRAR settings" dialogs. Restoring settings from the file can reduce time required to configure WinRAR if you re-installed Windows or need to move WinRAR to another computer. If WinRAR cannot find settings in Registry and Settings.reg file is present in WinRAR or %APPDATA%\WinRAR folders, it will be imported automatically. It might be necessary to restart WinRAR to apply some of imported settings. These commands are unavailable if WinRAR.ini file is used to store settings.

"Create WinRAR.ini file" command in "Import/Export" submenu creates a new WinRAR.ini file and copies existing WinRAR settings from Registry to this file.

"File list" submenu contains two groups of options. "Flat folders view" command (Ctrl+H keyboard hot key) switches between the classic tree style view and flat view, when all archived files and folders are displayed in the same list. It is applicable only in the archive management mode. Another options group is "List view" and "Details" items, which control the file list appearance. "List view" switches the list to multicolumn mode with only file names displayed, when "Details" enables more informative view providing file sizes and other information.

"Folder tree" submenu allows to turn on or off the folder tree panel. You can configure it separately for file management ("Show disk folders" menu item) and archive management ("Show archive folders" item) modes. Another way to change the state of folder panel is Ctrl+T keyboard shortcut. Folder tree is convenient if you need to navigate in disk or archive folders quickly. You may change the width of folder tree by dragging its right border with the mouse.

"Themes" submenu contains the list of available WinRAR interface themes, "Organize themes…" command providing theme management functions and "Get more themes…" command loading themes web page.

Another command of this menu is "View log…". It opens, in the internal viewer, the contents of rar.log, which exists in %APPDATA%\WinRAR folder. Note that you need to switch on "Log errors to file" in General settings dialog to force WinRAR to write errors to the log file. Use "Clear log" menu command to clear contents of the log file. Logging is available only in the registered version.


Help menu

Select "Help topics" command to view the contents of WinRAR help.

Use "WinRAR home page" item to connect to WinRAR home page, where you always may download the latest WinRAR version and register your shareware WinRAR copy online.

"About WinRAR…" command displays the dialog box containing version and copyright information.


How to open an archive from Windows shell

If you did not disable the option "Associate WinRAR with archives" when installing WinRAR, it is really easy to open an archive in WinRAR from Explorer or Desktop. Simply double-click on the archive icon.

You also may associate WinRAR with archives after installation using Integration settings dialog.


Using context menus

If you did not disable the option "Integrate WinRAR into shell" when installing WinRAR, several additional items will be added to the standard file and folder context menus, which appear when you click the right mouse button on a file icon in Explorer or Desktop.

For archives WinRAR adds the items: "Extract files…", "Extract Here" and "Extract to <folder name>", where <folder name> is replaced with the real name of the folder. All the commands call WinRAR to extract archive contents, but the first command allows you to enter the destination folder and some extraction options in Extraction path and options dialog, while the second performs extraction to the current folder and the third to the proposed folder without additional questions. When you unpack a group of archives, the context menu will also include "Extract each archive to separate folder" item allowing to place contents of each unpacked archive to separate folder.

Also WinRAR modifies "Properties" item of archives context menu to show archive information and, if present, archive comment. The archive information is similar to that displayed by Show information command.

For common files and folders WinRAR adds items: "Add to archive…", "Add to the archive <archive name>", "Compress and email…", "Compress to <archive name> and email", where <archive name> is replaced with the actual name of the archive. Both "Add" commands call WinRAR to add selected files to archive, but the first command allows to enter the archive name and some compression options in Archive name and parameters dialog, when the second starts adding to the proposed archive without additional questions. Similarly, both "Email" commands compress selected files and attach a created archive to email message, but the first allows to set additional options. You need to have a MAPI compliant email program installed to use these "Email" commands (most modern email programs support MAPI interface).


Drag and drop support

WinRAR supports the Windows drag and drop facility.

If, in the file management mode, a single archive is dropped to WinRAR, the archive contents will be displayed and WinRAR will enter archive management mode.

If, in the file management mode, a one or more non-archive files are dropped to WinRAR, WinRAR will prompt for an archive name and add these files to that archive.

If, in the archive management mode, a single archive is dropped to WinRAR toolbar or address bar, contents of dropped archive will be displayed. If you wish to add one or more files to currently browsing archive, drop them to WinRAR file list. Though, if files are not archives, dropping them to toolbar or address bar will produce the same result as dropping to file list. Dropping files is available only into RAR and ZIP archives.

Regardless of the current WinRAR mode and archive format, you may drag files from WinRAR to other programs.

If you did not disable the option "Integrate WinRAR into shell" when installing WinRAR, you may drop files to RAR or ZIP archive icons on the Desktop to add files to an archive. Also if you drag an archive using the right mouse button and drop it to the destination folder, you may select "Extract Here" in the context menu to extract all iles from the dropped archive to the destination folder. If you drag a single non-archive file or several files with right mouse button and drop them to the destination folder, you will be able to create an archive containing these files in the destination folder using "Add to archive..." and "Add to <archive name>" commands in context menu.


Common command line syntax

Command line syntax

It is possible to perform WinRAR commands from the command line. Common command line syntax is described below:

WinRAR <command> -<switch1> -<switchN> <archive> <files...> <@listfiles...> <path_to_extract\>

Command | Character combination specifying the function to be performed by WinRAR. See the list of WinRAR commands here.
Switch | Switches are used to define a specific type of operation, compression strength, type of archive, etc. See the list of WinRAR switches here.
Archive | The name of the archive to process.
Files | The name(s) of files to be processed.
Listfiles | Listfiles are plain text files that contain names of files to process. File names should start at the first column. It is possible to put comments to the listfile after // characters. For example, you may create backup.lst containing the following strings: c:\work\doc\*.txt//backup text documents c:\work\image\*.bmp//backup pictures c:\work\misc and then run: winrar a backup @backup.lst You may specify both usual file names and list files in the same command line.
Path_to_extract | Used only with commands e and x, indicating the folder in which to place extracted files. If this folder does not exist, it will be created.

Notes

a) If neither files nor listfiles are specified, then *.* is implied and WinRAR will process all files;

b) If archive extension is not specified when creating an archive, WinRAR will use the default archive format selected in the default compression profile, but you may override it by specifying either .rar or .zip extension.

If no archive extension is specified when extracting, WinRAR assumes .rar, so * means all archives with .rar extension. If you need to process all archives without extension, use *. mask. *.* mask selects all files. You can use wildcards in archive name in most operations, such as extraction, test and many others, but wildcards are not allowed when archiving and deleting.

c) Switches entered on the command line override the same configuration settings;

d) For commands c, e, s, t, rr, k and x wildcards may be used in the archive name. Thus it is possible to process more than one archive with a single command. Moreover, if you specify -r switch with these commands, they will search for archives in subfolders;

e) Some commands and switches are applicable only to RAR archives, some both to RAR and ZIP and some to all archive formats. This is dependent upon the functionality provided by the archive format;

f) Commands and switches are not case sensitive, you may write them both in upper and in lower case;

g) If any component of command line contains spaces, enclose it to quotes.

Examples

  1. add the folder "c:\latest data" to archive Info.rar

WinRAR a Info.rar "c:\latest data"

  2. unpack the archive Info.rar to folder d:\data

WinRAR x Info.rar d:\data\


Alphabetic commands list

a | add files to an archive
c | add an archive comment
ch | change archive parameters
cv | convert archives
cw | write an archive comment to file
d | delete files from an archive
e | extract files from an archive, ignoring paths
f | freshen files within an archive
i | find string in archives
k | lock an archive
m | move files and folders to an archive
r | repair a damaged archive
rc | reconstruct missing volumes
rn | rename archived files
rr[N] | add data recovery record
rv[N] | create recovery volumes
s[name] | convert an archive to a self-extracting type
s- | remove SFX module
t | test archive files
u | update files within an archive
x | extract files from an archive with full paths


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

  2. 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.

  3. 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

  4. 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\*


Command C - add an archive comment

This command allows to add a comment to an archive. The maximum comment length is 62000 bytes for RAR archives and 32768 bytes for ZIP archives. It is also possible to add an archive comment through archive management command Add archive comment.

Because archive volume modification is disabled, this command is not applicable to volumes. You may use switch -z<file> to add a comment to a volume when creating it.

Examples

  1. add comment to the archive distrib.rar

WinRAR c distrib.rar

  2. Comments may be added from a file by using the -z<file> switch.

WinRAR c -zinfo.txt dummy


Command CH - change archive parameters

This command can be used with most of archive modification switches to modify archive parameters. It is especially convenient for switches like -cl, -cu, -tl, which do not have a dedicated command.

It is not able to recompress, encrypt or decrypt archive data and it cannot merge or create volumes. If used without any switches, 'ch' command just copies the archive data without modification.

Example

set archive time to latest file

WinRAR ch -tl files.rar


Command CV - convert archives

This command provides the command line interface to WinRAR Convert archives. You can combine it with -y switch to skip "Convert archives" dialog and start the operation with default parameters. Use "Save" button in "Convert archives" dialog to change default parameters.

Example

convert all ZIP archives in the c:\files folder using default conversion parameters

WinRAR cv -y c:\files\*.zip


Command CW - write an archive comment to file

This command allows to save an archive comment to file. Format of output file depends on -sc switch.

Examples

  1. store the comment of archive arc to ASCII file comment.txt

WinRAR cw arc comment.txt

  2. store the comment of archive arc to Unicode file unicode.txt

WinRAR cw -scuc arc unicode.txt


Command D - delete from an archive

Delete specified files and folders from an archive. This is the command line equivalent of the archive management command Delete.

Notes

  1. If after deleting all files are removed from the archive, the empty archive will removed.
  2. Because archive volume modification is disabled, this command is not applicable to volumes.

Example

delete from the archive dummy all *.dmy files

WinRAR d dummy *.dmy


Command E - extract from archive ignoring paths

Command E - extract from an archive ignoring paths

Extract archived files, ignoring paths, to the current or a specified folder. This is the command line equivalent of the archive management command Extract to the specified folder with the option "Do not extract paths" enabled in the Extraction path and options dialog.

Example

extract to the current folder all *.doc files from all RAR archives in the current folder

WinRAR e *.rar *.doc


Command F - freshen files within an archive

Update files in the archive only if they are older than the files to add. This command will not add new files to the archive. This is the command line equivalent of the command Add to archive with "Fresh existing files only" update mode selected in the Archive name and parameters dialog.

Because archive volume modification is disabled, this command is not applicable to volumes.

See also: command A - add files to archive


Command I - search string in archives

Command I[i|c|h|t]=<string> - search string in archives

Find string in archives. Supports following optional parameters:

i case insensitive search (default);

c case sensitive search;

h hexadecimal search;

t use ANSI, Unicode and OEM character tables;

If no parameters are specified, it is possible to use the simplified command syntax i<string> instead of i=<string>

It is allowed to specify 't' modifier with other parameters, for example, ict=string performs case sensitive search using all mentioned above character tables.

Because of technical limitations now WinRAR does not support search in ACE archive format.

Examples

  1. Perform case sensitive search of "first level" string in *.txt files in *.rar archives on the disk c:

WinRAR "ic=first level" -r c:\*.rar *.txt

  2. Search for hex string f0 e0 ae ae ab 2d 83 e3 a9 in rar archives in e:\texts folder.

WinRAR ih=f0e0aeaeab2d83e3a9 -r e:\texts


Command K - lock an archive

This command prevents any further archive modifications by WinRAR. This is the command line equivalent of the archive management command Lock archive.

Example

WinRAR k release


Command M - move files and folders to an archive

Similar to command a, but files and folders are erased upon successful completion of the packing operation. This is the command line equivalent of the command Add to archive with the option "Delete files after archiving", enabled in the Archive name and parameters dialog.

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


Command R - repair a damaged archive

Archive repairing consists of two stages. First, the damaged archive is scanned for recovery record (see the rr command). If archive contains the previously added recovery record and if damaged data area is continuous and smaller than error correction code size in recovery record, chance of successful archive reconstruction is high. When this stage has been completed, a new archive is created, named as fixed.arcname.rar, where 'arcname' is the original (damaged) archive name.

If damaged archive does not contain the recovery record or if archive cannot be completely recovered due to severe damage, second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail checksum validation, but it is still possible to recover undamaged files which were inaccessible due to a corrupt archive structure. Generally this is useful for non-solid archives. In a damaged solid archive, often, only the first file may be recovered during the second stage. This stage is not performed for archives with encrypted file names, which can be repaired only if recovery record is present.

When this stage has been completed, a new archive will be created, named as rebuilt.arcname.rar, where 'arcname' is the original archive name.

By default, repaired archives are created in the current folder, but you can append an optional destpath\ parameter to specify another destination folder.

This command is the command line equivalent of the file management command Repair archive.

Example

repair buggy.rar and place the result to 'c:\fixed' folder

WinRAR r buggy.rar c:\fixed\


Command RC - reconstruct missing volume

Reconstruct missing volumes using recovery volumes (.rev files). You need to specify any existing volume as the archive name, for example:

WinRAR rc backup.part03.rar

You may read more about recovery volumes here.


Command RN - rename archived files

Rename files inside of archive. This command is supported for RAR and ZIP formats. The command syntax is:

winrar rn <arcname> <srcname1> <destname1> … <srcnameN> <destnameN>

For example, the following command:

WinRAR rn data.rar readme.txt readme.bak info.txt info.bak

will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.

It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:

WinRAR rn data.rar *.txt *.bak

will rename all *.txt files to *.bak.

WinRAR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such command is potentially dangerous, because a wrong wildcard may corrupt all archived names.


Command RR[N] - add data recovery record

Optionally, redundant information (recovery record) may be added to RAR archive. While it increases the archive size, it helps to recover archived files in case of disk failure or data loss of other kind, provided that damage is not too severe. Such damage recovery can be done with command "r". ZIP archive format does not support the recovery record.

RAR 4.x and RAR 5.0 archives use different recovery record structure and algorithms.

RAR 4.x recovery record is based on XOR algorithm. You can specify 4.x record size as a number of recovery sectors or as a percent of archive size. To specify a number of sectors just add it directly after 'rr', like 'rr1000' for 1000 sectors. To use a percent append 'p' or '%' modifier after the percent number, such as 'rr5p' or 'rr5%' for 5%. Note that in Windows .bat and .cmd files it is necessary to use 'rr5%%' instead of 'rr5%', because the command processor treats the single '%' as the start of a batch file parameter, so it might be more convenient to use 'p' instead of '%' in this case.

RAR 4.x recovery sectors are 512 bytes long. If damaged area is continuous, every sector helps to recover 512 bytes of damaged information. This value may be lower in cases of multiple damage. Maximum number of recovery sectors is 524288.

Size of 4.x recovery record may be approximately determined as <archive size>/256 + <number of recovery sectors>*512 bytes.

RAR 5.0 recovery record uses Reed-Solomon error correction codes. Its ability to repair continuous damage is about the same as for RAR 4.x, allowing to restore slightly less data than recovery record size. But it is significantly more efficient than RAR 4.x record in case of multiple damaged areas.

RAR 5.0 record does not use 512 byte sectors and you can specify its size only as a percent of archive size. Even if '%' or 'p' modifier is not present, RAR treats the value as a percent in case of RAR 5.0 format, so both 'rr5' and 'rr5p' mean 5%. Due to service data overhead the actual resulting recovery record size only approximately matches the user defined percent and difference is larger for smaller archives.

RAR 5.0 recovery record size cannot exceed the protecting archive size, so you cannot use more than 100% as a parameter. Larger recovery records are processed slower both when creating and repairing.

Both 4.x and 5.0 records are most efficient if data positions in damaged archive are not shifted. If you copy an archive from damaged media using some special software and if you have a choice to fill damaged areas with zeroes or to cut out them from copied file, filling with zeroes or any other value is preferable, because it allows to preserve original data positions. Still, even though it is not an optimal mode, both versions of record attempt to repair data even in case of deletions or insertions of reasonable size, when data positions were shifted. RAR 5.0 recovery record handles deletions and insertions more efficiently than RAR 4.x.

If you use the plain 'rr' command without optional parameter, WinRAR will set the recovery record size to 3% of archive size by default.

This command is the command line equivalent of archive management command Protect archive from damage.

Examples

  1. add a data recovery record of the default size (1%) to the archive backup

WinRAR rr backup

  2. add a data recovery record to the archive pictures and set its size to 5% of the total archive size

WinRAR rr5p pictures


Command RV[N] - create recovery volumes

Create recovery volumes (.rev files), which can be later used to reconstruct missing files in a volume set.

This command makes sense only for RAR multivolume archives and you need to specify the name of the first volume in the set as the archive name. For example:

WinRAR rv3 data.part01.rar

The optional <N> parameter specifies a number of recovery volumes to create and must be less than the total number of RAR volumes in the set. You may also append a percent or 'p' character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes. For example:

WinRAR rv15% data.part01.rar

You may read more about recovery volumes here.


Command S[name] - convert an archive to a Self-Extracting type

Command S[name] - convert an archive to a self-extracting

This command creates a self-extracting archive (SFX) which, when executed, extracts the files contained within it.

It is also possible to make an SFX archive as the first of a multi-volume sequence, but it should be noted that the size will be larger by the amount of the SFX module. Should SFX volumes be created using the command a with the switches: -v[<size>] -sfx, then you do not need to ensure the volume size - the first volume will be automatically created with the correct size.

This command is the command line equivalent of the archive management command Convert archive to SFX.

Example

WinRAR s diamant

By default, WinRAR uses for RAR archives SFX module file default.sfx, which must exist in the same folder as winrar.exe and, for ZIP archives, zip.sfx module. It is possible to specify, in the "s" command, an alternate SFX module name.

For example, to add the console SFX module WinCon.sfx execute:

WinRAR sWinCon.sfx myinst


Command S- - remove SFX module

This command removes a self-extracting module from the already existing self-extracting archive (SFX).

WinRAR creates a new archive without SFX module, the original SFX archive is not deleted.

Example

WinRAR s- rarsetup.exe


Command T - test archive files

Command T - test archived files

This command performs a dummy file extraction, writing nothing to the output stream, in order to validate the specified file(s). This is the command line equivalent of the archive management command Test files.

Example

test all *.rar archives on the current disk

WinRAR t -r \*.rar


Command U - update files within an archive

This command, as well as command f, updates files in the archive only if they are older than files being added, but unlike "f", it will add new files as well.

This is the command line equivalent of the command Add to archive with "Add and update files" update mode selected in the Archive name and parameters dialog.

Because archive volume modification is disabled, this command is not applicable to volumes.

See also: command A - add files to archive


Command X - extract files from an archive with full paths

Extract files and folder with full paths. The folder structure, saved in the archive, is completely restored. This is the command line equivalent of the archive management command Extract.

In a similar manner as command e this command can extract files both to the current folder and to a specified folder.

For example, command:

WinRAR x Fonts *.ttf

will extract *.ttf files from the archive Fonts to the current folder, but the command:

WinRAR x Fonts *.ttf NewFonts\

will extract *.ttf files from the archive Fonts to the folder NewFonts

You need to use the trailing backslash as in the example above for denoting the destination folder.


Alphabetic switches list

-- | stop switches scanning
-@[+] | disable [enable] file lists
-ac | clear Archive attribute after compression or extraction
-ad | append archive name to destination path
-af<type> | specify archive format
-ag[format] | generate archive name using the current date and time
-ai | ignore file attributes
-ao | add files with Archive attribute set
-ap<path> | set path inside archive
-as | synchronize archive contents
-cfg- | ignore default profile and environment variable
-cl | convert file names to lower case
-cp<name> | select a compression profile
-cu | convert file names to upper case
-df | delete files after archiving
-dh | open shared files
-dr | delete files to Recycle Bin
-ds | do not sort archiving files
-dw | wipe files after archiving
-ed | do not add empty folders
-en | do not add "end of archive" block
-ep | exclude paths from names
-ep1 | exclude base folder from names
-ep2 | expand paths to full
-ep3 | expand paths to full including the drive letter
-e[+]<attr> | set file exclude or include attributes
-f | freshen files
-hp[pwd] | encrypt both file data and headers
-ht[b|c] | select hash type [BLAKE2,CRC32] for file checksum
-iadm | request administrative access for SFX archive
-ibck | run WinRAR in background
-ieml[.][addr] | send archive by email
-iicon<name> | specify SFX icon
-iimg<name> | specify SFX logo
-ilog[name] | log errors to file
-inul | disable error messages
-ioff | turn PC off
-k | lock archive
-kb | keep broken extracted files
-log[fmt][=name] | write names to log file
-m<n> | set compression method
-ma[4|5] | specify a version of archiving format
-mc<par> | set advanced compression parameters
-md<n> | select dictionary size
-ms[list] | specify file types to store
-mt<threads> | set the number of threads
-n<file> | additionally filter included files
-n@<listfile> | read additional filter masks from list file
-oc | set NTFS "Compressed" attribute
-oh | save hard links as the link instead of the file
-oi[-] | save identical files as references
-ol | save symbolic links as the link instead of the file
-or | rename files automatically
-os | save NTFS streams
-ow | process file security information
-o[+|-] | set the overwrite mode
-p[pwd] | set password
-qo[-|+] | add quick open information [none|force]
-r | recurse subfolders
-r- | disable recursion
-r0 | recurse subfolders for wildcard names only
-ri | set priority and sleep time
-rr[N] | add data recovery record
-rv[N] | create recovery volumes
-s | create a solid archive
-s<N> | create solid groups using file count
-sc<charset>[objects] | specify the character set
-se | create solid groups using file extension
-sfx[name] | create self-extracting archive
-sl<size> | process files with size less than specified
-sm<size> | process files with size more than specified
-sv | create independent solid volumes
-sv- | create dependent solid volumes
-s- | disable solid archiving
-t | test files after archiving
-ta<date> | process files modified after the specified date
-tb<date> | process files modified before the specified date
-tk | keep original archive time
-tl | set archive time to newest file
-tn<time> | process files newer than the specified time
-to<time> | process files older than the specified time
-ts<m,c,a> | save or restore file time (modification, creation, access)
-u | update files
-v<n>[k|b|f|m|M|g|G] | create volumes
-vd | erase disk contents before creating volume
-ver[n] | file version control
-vn | use the old style volume naming scheme
-vp | pause before each volume
-w<path> | set folder for temporary files
-x<file> | exclude the specified file
-x@<listfile> | exclude files listed in the specified list file
-y | assume Yes on all queries
-z<file> | read archive comment from file


Switch -- - stop switches scanning

This switch tells to WinRAR that there are no more switches in the command line. It could be useful, if either archive or file name starts from '-' character. Without '--' switch such a name would be treated as a switch.

Example

add all files from the current folder to the solid archive -StrangeName

WinRAR a -s -- -StrangeName


Switch -@[+] - disable [enable] file lists

WinRAR treats command line parameters starting from '@' character as file lists. So by default, WinRAR attempts to read 'filename' filelist, when encountering '@filename' parameter. But if '@filename' file exists, WinRAR treats the parameter as '@filename' file instead of reading the file list.

Switch -@[+] allows to avoid this ambiguity and strictly define how to handle parameters starting from '@' character.

If you specify -@, all such parameters found after this switch will be considered as file names, not file lists.

If you specify -@+, all such parameters found after this switch will be considered as file lists, not file names.

This switch does not affect processing parameters located before it.

Example

test the archived file '@home'

WinRAR t -@ notes.rar @home


Switch -AC - clear "Archive" attribute

This switch is designed for backup purposes. If it is used when archiving, "Archive" file attribute will be cleared for successfully compressed files. If used when extracting, WinRAR will clear "Archive" attribute for extracted files.


Switch -AD - append archive name to destination path

This option may be useful when unpacking a group of archives. By default WinRAR places files from all archives in the same folder, but this switch creates a separate folder for files unpacked from each archive.

Example

WinRAR x -ad *.rar data\

For every unpacked archive WinRAR will create subfolders below 'data'.


Switch -AF<type> - specify archive format

This switch allows to define a type of new archive in WinRAR command line. <Type> parameter can be 'rar' or 'zip'.

For example, 'winrar a -afzip arc' will create arc.zip archive.

This switch is supported only by WinRAR. Console RAR is not able to create ZIP archives.


Switch -AG[format] - generate archive name using the current date and time

Appends the current date string to an archive name when creating or processing an archive. Useful for daily backups.

Format of the appending string is defined by the optional format parameter or by "YYYYMMDDHHMMSS" if this parameter is absent. The format string may include the following characters:

Y | year
M | month
MMM | month as text string (Jan, Feb, etc.)
W | a week number (a week starts with Monday)
A | day of week (Monday is 1, Sunday is 7)
D | day of month
E | day of year
H | hours
M | minutes (treated as minutes if encountered after hours)
I | minutes (treated as minutes regardless of hours position)
S | seconds
N | archive number (numeric value starting from 1). When archiving, WinRAR searches for already existing archive with generated name and if found, increments the archive number until generating an unused name. 'N' format character is not supported when creating volumes. When performing non-archiving operations like extracting, WinRAR selects the existing archive preceding the first unused name or sets N to 1 if no such archive exists.

Each of format string characters listed above represents only one character added to archive name. For example, use WW for two digit week number or YYYY to define the four digit year.

If the first character in the format string is '+', positions of the date string and base archive name are exchanged, so a date will precede an archive name.

The format string may contain optional text enclosed in '{' and '}' characters. This text is inserted into archive name.

All other characters are added to an archive name without changes.

If you need to process an already existing archive, be careful with -ag switch. Depending on the format string and time passed since previous -ag use, generated and existing archive names may mismatch. In this case WinRAR will create or open a new archive instead of processing the already existing one. You may use -log switch to write the generated archive name to a file and then read it from file for further processing.

Examples

  1. use the default YYYYMMDDHHMMSS format

WinRAR a -ag backup

  2. use DD-MMM-YY format

WinRAR t -agDD-MMM-YY backup

  3. use YYYYMMDDHHMM format, place date before 'backup'

WinRAR a -ag+YYYYMMDDHHMM backup

  4. use YYYY-WW-A format, include fields description

WinRAR a -agYYYY{year}-WW{week}-A{wday} backup

  5. use YYYYMMDD and the archive number. It allows to generate unique names even when YYYYMMDD format mask used more than once in the same day

WinRAR a -agYYYYMMDD-NN backup


Switch -AI - ignore file attributes

If this switch is used when extracting, WinRAR does not set general file attributes stored in archive to extracted files. This switch preserves attributes assigned by operating system to a newly created file. It affects archive, system, hidden and read-only attributes.

If this switch is used when archiving, predefined values, typical for file and folder, are stored instead of actual attributes.

Supported only for RAR and ZIP formats when extracting and only for RAR format when archiving.


Switch -AO - add files with "Archive" attribute set

This switch is designed for backup purposes. If it is used when archiving, only files with "Archive" file attribute will be added to archive.

Example

add all disk C: files with "Archive" attribute set to the 'f:backup' and clear files Archive attribute

WinRAR a -r -ac -ao f:backup c:\*.*


Switch -AP - set path inside archive

Switch -AP<path> - set path inside archive

The path defined using this switch is merged to file names when adding files to an archive and removed from file names when extracting.

For example, if you wish to add the file readme.txt to the folder DOCS\ENG of archive release, you may run:

WinRAR a -apDOCS\ENG release readme.txt

or to extract ENG to the current folder:

WinRAR x -apDOCS release DOCS\ENG\*.*

Available for RAR and ZIP formats only.


Switch -AS - synchronize archive contents

If this switch is used when archiving, those archived files which are not present in the list of the currently added files, will be deleted from the archive. It is convenient to use this switch in combination with -u to synchronize contents of an archive and an archiving folder.

For example, after the command:

WinRAR a -u -as backup sources\*.cpp

the archive backup.rar will contain only *.cpp files from folder sources, all other files will be deleted from the archive. It looks similar to creating a new archive, but with one important exception: if no files are modified since the last backup, the operation is performed much faster than the creation of a new archive.


Switch -CFG- - ignore default profile and environment variable

This switch instructs WinRAR to ignore the default compression profile options, RAR environment variable, default folder for archives, "Select for archives" fields in Organize passwords dialog.


Switch -CL - convert file names to lower case

When this switch is used, names of all files extracted from an archive, added to an archive, modified or update within an archive, will be converted to lower case. This is sometimes useful when moving an archive from a case insensitive OS to a case sensitive OS, for example extracting under Unix, an archive created under DOS.

Example

extract all files from port.rar converting names to lower case

WinRAR x -cl port


Switch -CP<name> - select a compression profile

Using this switch you can load settings stored in WinRAR compression profile. You need to specify a profile name as switch parameter. If profile stores selected file names, WinRAR will compress both files specified in the command line and stored in profile. If profile contains an archive name, it will be used in archiving and you should not specify another archive name in command line.

Example

Archive *.txt files using settings from "My Texts" compression profile

WinRAR a "-cpMy Texts" texts *.txt


Switch -CU - convert file names to upper case

When this switch is used, the names of all files extracted from an archive, added to an archive, modified or update within an archive, will be converted to upper case.

Example

extract all files from port.rar converting names to upper case

WinRAR x -cu port


Switch -DF - delete files after archiving

Move files to archive. This switch in combination with the command a performs the same action as the command m.


Switch -DH - open shared files

Allows to process files opened by other applications for writing.

This switch helps if an application allowed read access to file, but if all types of file access are prohibited, the file open operation will still fail.

This switch could be dangerous, because it allows to archive a file, which at the same time is modified by another application, so use it carefully.

If -dh is not specified, processing of shared files depends on the option "Open shared files" in the default compression profile.

Example

WinRAR a -dh dbf *.dbf


Switch -DR - delete files to Recycle Bin

Delete files after archiving and place them to Recycle Bin.


Switch -DS - do not sort archiving files

This switch is meaningful only for solid RAR archives. The compression ratio in solid archives is dependent upon the file order. By default WinRAR sorts files, to be added to a solid archive, by extension. You may disable this sorting using the -ds switch and try to set a more optimal file order. Generally files with similar data should be placed closely together.

Example

WinRAR a -s -ds tools *.com *.exe *.doc *.txt *.*

Files will be added in the following order: *.com, *.exe, *.doc, *.txt, all other file types.

Note

file rarfiles.lst also may be used to define the order of files in solid archives


Switch -DW - wipe files after archiving

Delete files after archiving. Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files.

Please be aware that such approach is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.


Switch -ED - do not add empty folders

This switch indicates that folder records are not to be stored in the created archive. When extracting such archives, WinRAR creates non-empty folders based on paths of files contained in them. Information about empty folders is lost. All attributes of non-empty folders except a name (access rights, streams, etc.) will be lost as well, so use this switch only if you do not need to preserve such information.

If -ed is used with m command or -df switch, WinRAR will not remove empty folders.


Switch -EN - do not add "end of archive" block

Not supported for RAR 5.0 archives.

By default, WinRAR adds an "end of archive" block to the end of a new or updated archive. It allows to skip external data like digital signatures safely, but in some special cases it may be useful to disable this feature. For example, if an archive is transferred between two systems via an unreliable link and at the same time a sender adds new files to it, it may be important to be sure that the already received file part will not be modified on the other end between transfer sessions.

This switch cannot be used with volumes, because the end of archive block contains information important for correct volume processing.


Switch -EP - exclude paths from names

With this switch, files are added to an archive without including the path information. This could result in multiple files existing in the archive with the same name.

Example

archive without paths all *.bas files from the current disk

WinRAR a -r -ep bsources \*.bas


Switch -EP1 - exclude base folder from names

Do not store the path entered in the command line.

Example

all files and folders from the folder tmp will be added to the archive test, but the path in the archived names will not include 'tmp\'

WinRAR a -r -ep1 test tmp\*

This is equivalent to the commands:

cd tmp

WinRAR a -r ..\test

cd ..


Switch -EP2 - expand paths to full

Store full file paths (except a drive letter and leading backslash) when archiving.


Switch -EP3 - expand paths to full including the drive letter

This switch stores full file paths including the drive letter if used when archiving. Drive separators (colons) are replaced by underscore characters.

If you use -ep3 when extracting, it will change underscores back to colons and create unpacked files in their original folders and disks. If the user also specified a destination path, it will be ignored.

It also converts UNC paths from \\server\share to __server\share when archiving and restores them to the original state when extracting.

This switch can help to backup several disks to the same archive. For example, you may run:

WinRAR a -ep3 -r backup.rar c:\ d:\ e:\

to create backup and:

WinRAR x -ep3 backup.rar

to restore it.

But be cautious and use -ep3 only if you are sure that extracting archive does not contain any malicious files. In other words, use it if you have created an archive yourself or completely trust its author. This switch allows to overwrite any file in any location on your computer including important system files and should normally be used only for the purpose of backup and restore.


Switch -E[+]<attr> - set file exclude and include attributes

Specifies file exclude or include attributes mask. <attr> is a number in the decimal, octal (with leading '0') or hex (with leading '0x') format.

By default, without '+' sign before <attr>, this switch defines the exclude mask. So if result of bitwise AND between <attr> and file attributes is nonzero, file would not be processed.

If '+' sign is present, it specifies the include mask. Only those files which have at least one attribute specified in the mask will be processed.

In the Windows version is also possible to use symbols D, S, H, A and R instead of a digital mask to denote folders and files with system, hidden, archive and read-only attributes. The order in which the attributes are given is not significant.

It is allowed to specify both -e<attr> and -e+<attr> in the same command line.

Examples

  1. archive only folder names without their contents

WinRAR a -r -e+d folders

  2. do not compress system and hidden files:

WinRAR a -esh files

  3. do not extract read-only files:

WinRAR x -er files


Switch -F - freshen files

May be used with archive extraction or creation. The command string "a -f" is an equivalent to the command f. You could also use the switch "-f" with the command m.

If the switch "-f" is used with the commands x or e, then only old files will be replaced with new versions extracted from the archive. Archived files, without a matching unpacked file, will not be extracted.

The shell mode equivalent of this switch is the "Fresh existing files only" option in the Archive name and parameters dialog and "Fresh existing files" option in the Extraction path and options dialog.

Supported only for RAR and ZIP formats.


Switch -HP[pwd] - encrypt both file data and headers

This switch is similar to -p[p], but switch -p encrypts only file data and leaves other information like file names visible. This switch encrypts all sensitive archive areas including file data, file names, sizes, attributes, comments and other blocks, so it provides a higher security level.

Without a password it is impossible to view even the list of files in archive encrypted with -hp.

Example

add the file report.txt to the encrypted archive secret.rar using the password 'fGzq5yKw'

WinRAR a -hpfGzq5yKw secret report.txt


Switch -HT[B|C] - select hash type [BLAKE2,CRC32] for file checksum

File data integrity in RAR archive is protected by checksums calculated and stored for every archived file.

By default, WinRAR uses CRC32 function to calculate the checksum. RAR 5.0 archive format also allows to select BLAKE2 hash function instead of CRC32.

Specify -htb switch for BLAKE2 hash and -htc for CRC32 function. Since CRC32 is the default algorithm, you may need -htc only to override -htb mode in WinRAR configuration.

CRC32 output is 32 bit length. While CRC32 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same CRC32, it does not guarantee that file contents is the same.

BLAKE2 output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2, their contents is the same. BLAKE2 error detection property is also more reliable than in shorter CRC32.

Since BLAKE2 output is longer, resulting archive is a slightly larger for -htb switch.

If archive headers are unencrypted (no switch -hp), checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect encrypted file checksums to match usual CRC32 and BLAKE2 values.

This switch is supported only by RAR 5.0 format, so you need to use -ma switch with it.

-htb is the command line equivalent of Use BLAKE2 file checksum option in "Archive name and parameters" dialog.

Example

add *.lst to lists.rar using BLAKE2 for file checksums

WinRAR a -ma -htb lists.rar *.lst


Switch -IADM - request administrative access for SFX archive

Use -IADM if you wish to create SFX archive, which will request the administrative access when started in Windows Vista and later. This switch does not change behavior of SFX archive in older Windows versions.

This switch is the command line equivalent of "Request administrative access" option in SFX options: Advanced dialog.

Example

WinRAR a -sfx -iadm install.exe c:\data


Switch -IBCK - run WinRAR in background

Minimize WinRAR to tray when starting an archive processing operation.

Shell mode equivalent of this switch are "Background archiving" option in Archive name and parameters dialog and "Background extraction" option in extraction dialog.


Switch -IEML[.][addr] - send archive by email

Attach an archive created or updated by the add command to email message. You need to have a MAPI compliant email client to use this switch (most modern email programs support MAPI interface).

You may enter a destination email address directly in the switch or leave it blank. In the latter case you will be asked for it by your email program. It is possible to specify several addresses separated by commas or semicolons.

If you append a dot character to -ieml, an archive will be deleted after it was successfully attached to an email.

If the switch is used when creating a multivolume archive, every volume is attached to a separate email message.


Switch -IICON<name> - specify SFX icon

Specify an icon to use in the created or updated SFX archive. The <name> parameter is a name of .ico file. You must not compress SFX module by any third party executable compressors if you are going to use -iicon.

This switch is the command line equivalent of "Load SFX icon from the file" option in SFX options: Text and icon dialog.

Examples

  1. add contents of c:\myfiles folder to setup.exe SFX archive and use c:\myicons\ver1.ico as SFX icon

WinRAR a -sfx -iiconc:\myicons\ver1.ico setup.exe c:\myfiles

  2. replace an icon in the already existing SFX archive setup.exe with ver2.ico stored in the current folder

WinRAR s -iiconver2.ico setup.exe


Switch -IIMG<name> - specify SFX logo

Specify a bitmap image file to display as logo in the created or updated SFX archive. The <name> parameter is a name of .bmp file. You must not compress SFX module by any third party executable compressors if you are going to use -iimg.

This switch is the command line equivalent of "Load SFX logo from the file" option in SFX options: Text and icon dialog.

Size of default SFX logo is 93x302 pixels. It is recommended to use bitmaps of same size or smaller.

Examples

  1. add contents of c:\myfiles folder to setup.exe SFX archive and use c:\pictures\logo1.bmp as SFX logo

WinRAR a -sfx -iimgc:\pictures\logo1.bmp setup.exe c:\myfiles

  2. replace a logo in the already existing SFX archive setup.exe with logo2.bmp stored in the current folder

WinRAR s -iimglogo2.bmp setup.exe


Switch -ILOG[name] - log errors to file

Write error messages to the file rar.log created in WinRAR folder. You may view contents of this file using "View log…" command in Options menu. It is possible to specify another log file name instead of the default rar.log in the switch, for example, -ilogc:\log\backup.log. If the specified name does not include the path, the log file will be created in %APPDATA%\WinRAR folder.

If the option "Log errors to file" in General settings dialog is enabled, error messages will be written to rar.log even without -ilog switch.

By default, log file uses UTF-16 little endian encoding, but it can be changed with -sc<charset>g switch, such as -scag for native single byte encoding.


Switch -INUL - disable error messages

Disable WinRAR error messages.


Switch -IOFF - turn PC off

Turn PC off after completing an operation. The hardware must support the power off feature.


Switch -K - lock archive

This switch prevents any further archive modifications by WinRAR.


Switch -KB - keep broken extracted files

This switch disables WinRAR to remove broken files after extraction.


Switch -LOG[fmt][=name] - write names to log file

This switch allows to write archive and file names to specified text file in archiving, extracting, deleting commands for RAR format and in archiving commands for ZIP format. Its behavior is defined by 'fmt' string, which can include one or more of following characters:

A | Write archive names to log file. If WinRAR creates or processes volumes, all volume names are logged.
F | Write processed file names to log file. It includes files added to archive and extracted, deleted or listed files inside of archive.
P | If log file with specified name is exist, append data to existing file instead of creating a new one.
U | Write data in Unicode format.

If neither 'A' nor 'F' are specified, 'A' is assumed.

'name' parameter allows to specify the name of log file. It must be separated from 'fmt' string by '=' character. If 'name' is not present, WinRAR will use the default rarinfo.log file name.

It is allowed to specify several -log switches in the same command line.

This switch can be particularly useful, when you need to process an archive created with -ag or -v switches in a batch script. You can specify -loga=arcname.txt when creating an archive and then read an archive name generated by WinRAR from arcname.txt with an appropriate command batch file command, like: set /p name=<arcname.txt.

All functions of this switch are supported for RAR format only. In case of ZIP format only archiving operations are supported. Other archive formats do not support this switch.

Examples

  1. write names of created volumes to vollist.txt

WinRAR a -v100m -loga=vollist.txt volume.rar c:\data

  2. write the generated archive name to backup.txt in Unicode

WinRAR a -ag -logau=backup.txt backup.rar myfiles\*

  3. write names of tested volumes to vollist.txt and names of tested archived files inside of volumes to filelist.txt

WinRAR t -log=vollist.txt -logf=filelist.txt volume.part01.rar


Switch -M<n> - set compression method

Choosing <n> from 0 to 5 you may select an appropriate compression method

-m0 | Store | Add files to archive without compression
-m1 | Fastest | Fastest method (least compressive)
-m2 | Fast | Fast compression method
-m3 | Normal | Normal (default) compression method
-m4 | Good | Good compression method (more compressive)
-m5 | Best | Best compression method (most compressive but also most slow)

If this switch is not specified, WinRAR uses "-m3" method (Normal compression).

Compression method also can be selected with "Compression method" list in Archive name and parameters dialog.


Switch -MA[4|5] - specify a version of archiving format

By default WinRAR creates archives in RAR 4.x format. Use -ma5 or just -ma to create RAR 5.0 archives. Use -ma4 in case you need to override -ma5 saved in configuration and force WinRAR to use RAR 4.x format.

This switch is used only when creating a new archive. It is ignored when updating an existing archive.

Example

Create RAR 5.0 solid archive and compress SrcDir using 64 MB dictionary:

WinRAR a -ma -md64m data SrcDir


Switch -MC<par> - set advanced compression parameters

This switch is intended mainly for benchmarking and experiments. In the real environment it is usually better to allow WinRAR to select optimal parameters automatically. Please note that improper use of this switch may lead to very serious performance and compression loss, so use it only if you clearly understand what you do.

It has the following syntax:

-mc[param1][:param2][module][+ or -]

where <module> is the one character field denoting a part of the compression algorithm, which has to be configured. It may have the following values:

A | audio compression;
C | true color (RGB) data compression;
D | delta compression;
E | 32-bit x86 executables compression;
I | 64-bit Intel Itanium executables compression;
T | text compression.

RAR 5.0 archive format supports only 'D' and 'E' values.

'+' sign at the end of switch applies the selected algorithm module to all processed data, '-' disables the module at all. If no sign is specified, WinRAR will choose modules automatically, based on data and the current compression method. Switch -mc- disables all optional modules and allows only the general compression algorithm.

<Param1> and <Param2> are module dependent parameters described below.

Audio compression, delta compression

<Param1> is a number of byte channels (can be 1 - 31).

WinRAR splits multibyte channels to bytes, for example, two 16-bit audio channels are considered by WinRAR as four channels one byte each.

<Param2> is ignored.

32-bit x86 Intel executables compression, 64-bit Intel Itanium executables compression, true color (RGB) data compression

<Param1> and <Param2> are ignored.

Text compression

The text compression algorithm provides noticeably higher compression on plain text data. But it cannot utilize several CPU cores efficiently resulting in slower compression time comparing to general algorithm in multicore and multiprocessor environment. Also its decompression speed is much slower than in general algorithm regardless of CPU cores number. This is why the text compression is disabled by default. You can specify -mct switch to allow WinRAR to select this algorithm automatically for suitable data. Switch -mct+ will force use of the text compression for all data.

Switch -mct can also include <Param1> and <Param2>, so its full syntax is -mc[param1][:param2]t[+ or -].

<Param1> is the order of PPM algorithm (can be 2 - 63).

<Param2> is memory in megabytes allocated for PPM (1-128).

PPM uses the equal memory size both to compress and decompress, so if you allocate too much memory when creating an archive, other people may have problems when decompressing it on a computer with less memory installed. Decompression will be still possible using virtual memory, but it may become very slow.

Examples:

  1. switch -mc1a+ forces use of 8-bit mono audio compression for all data.
  2. switch -mc10:40t+ forces use of text compression algorithm for all data, sets the compression order to 10 and allocates 40 MB memory.
  3. switch -mc12t sets the text compression order to 12, when the text compression is used, but leaves to WinRAR to decide when to use it.
  4. switches -mct -mcd- allow WinRAR to apply the text compression to suitable data and disable the delta compression.


Switch -MD<n>[k,m,g] - select the dictionary size

Sliding dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. If size of file being compressed (or total files size in case of solid archive) is larger than dictionary size, increasing the dictionary is likely to increase the compression ratio, reduce the archiving speed and increase memory requirements.

For RAR 4.x archive format the dictionary size can be: 64 KB, 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB.

For RAR 5.0 archive format the dictionary size can be: 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB.

You can use 'k', 'm' and 'g' modifiers to specify the size in kilo-, mega- and gigabytes, like -md64m for 64 MB dictionary. If no modifier is specified, megabytes are assumed, so -md64m and -md64 are equal.

When archiving, WinRAR needs about 6x memory of specified dictionary size, so 512 MB and 1 GB sizes are available in 64 bit WinRAR version only. Maximum archiving dictionary size is even smaller and equal to 128 MB, when running in Windows XP x86. When extracting, slightly more than a single dictionary size is allocated, so both 32 and 64 bit versions can unpack archives with all dictionaries up to and including 1 GB.

WinRAR can reduce the dictionary size if it is significantly larger than source data size. It helps to reduce memory requirements without decreasing compression.

Default sliding dictionary size is 4 MB for RAR 4.x and 32 MB for RAR 5.0 archive format.

ZIP archives created by WinRAR always use 32 KB dictionary.

Dictionary size can also be selected in Dictionary size list in "Archive name and parameters" dialog.

Example

create a solid archive in RAR 5.0 format with 128 MB dictionary

WinRAR a -s -ma -md128 lib *.dll


Switch -MS - specify file types to store

Switch -MS[list] - specify file types to store

Specify file types, which will be stored without compression. When used properly, it helps to increase archiving speed without noticeable loss in the compression ratio.

Optional <list> parameter defines the list of file extensions separated by semicolons. For example, -msrar;zip;jpg will force WinRAR to store without compression all RAR and ZIP archives and JPG images. It is also allowed to specify wildcard file masks in the list, so -ms*.rar;*.zip;*.jpg will work too. Several -ms switches are permitted, such as -msrar -mszip instead of -msrar;zip.

If <list> is not specified, -ms switch will use the default set of extensions, which includes the following file types:

7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz, xz, z, zip


Switch -MT<threads> - set the number of threads

<threads> parameter can take values from 1 to 32. It defines the recommended maximum number of active threads for compression algorithm also as for other WinRAR modules, which can start several threads. While WinRAR attempts to follow this recommendation, sometimes the real number of active threads can exceed the specified value.

Change of <threads> parameter slightly affects the compression ratio, so archives created with different -mt switches will not be exactly the same even if all other compression settings are equal.

If -mt switch is not specified, WinRAR will try to detect the number of available processors and select the optimal number of threads automatically.


Switch -N<file> - additionally filter included files

Apply the mask as an additional filter to included file list. Wildcards may be used both in the name and file parts of file mask. See switch -x description for details on mask syntax. You may specify the switch '-n' several times. This switch does not replace usual file masks, which still need to be entered in the command line. It is an additional filter limiting processed files only to those matching the include mask specified in -n switch. It can help to reduce the command line length sometimes.

For example, if you need to compress all *.txt and *.lst files in folders Project and Info, you can enter:

WinRAR a -r text Project\*.txt Project\*.lst Info\*.txt Info\*.lst

or using the switch -n:

WinRAR a -r -n*.txt -n*.lst text Project Info


Switch -N@<listfile> - read additional filter masks from list file

Similar to -n<file> switch, but reads filter masks from the list file.

Example

WinRAR a -r -n@inclist.txt text Project Info


Switch -OC - set NTFS "Compressed" attribute

This switch allows to restore NTFS "Compressed" attribute when extracting files. WinRAR saves Compressed file attributes when creating an archive, but does not restore them unless -oc switch is specified. Shell mode equivalent of this switch is "Set attribute Compressed" option in "Advanced" part of extraction dialog.

This switch is supported only for RAR archives.


Switch -OH - save hard links as the link instead of the file

If archiving files include several NTFS hard links, store the first archived hard link as usual file and the rest of hard links in the same set as links to this first file. When extracting such files, WinRAR will create hard links instead of usual files.

You must not delete or rename the first hard link in archive after the archive was created, because it will make extraction of following links impossible. If you modify the first link, following links will also have the modified contents after extracting. Extraction command must involve the first hard link to create following hard links successfully. Supported for RAR 5.0 archives only.

This switch is the command line equivalent of Store hard links as links group of options in "Archive name and parameters" dialog.


Switch -OI[-][:<minsize>] - save identical files as references

If this switch is specified, WinRAR analyzes the file contents before starting archiving. If several identical files are found, the first file in the set is saved as usual file and all following files are saved as references to this first file. It allows to reduce the archive size, but applies some restrictions to resulting archive. You must not delete or rename the first identical file in archive after the archive was created, because it will make extraction of following files using it as a reference impossible. If you modify the first file, following files will also have the modified contents after extracting. Extraction command must involve the first file to create following files successfully.

It is recommended to use -oi only if you compress a lot of identical files, will not modify an archive later and will extract an archive entirely, without necessity to unpack or skip individual files. If all identical files are small enough to fit into compression dictionary specified with -md<n> switch, -s can provide more flexible solution than -oi.

Optional <minsize> value allows to define the minimum file size threshold. Files smaller than <minsize> are not analyzed and not considered as identical. If this parameter is not present, it is assumed to be 64 KB by default. Selecting too small <minsize> may increase the time required to detect identical files.

Supported for RAR 5.0 archives only.

Use -oi- if you wish to disable identical file processing enabled in WinRAR configuration.

This switch is the command line equivalent of Save identical files as references option in "Archive name and parameters" dialog.

Example:

Save contents of current directory to archive.rar. Store identical files larger than 1000000 bytes as references.

WinRAR a -oi:1000000 -ma archive


Switch -OL - save symbolic links as the link instead of the file

Store NTFS symbolic links and reparse points as links, so file contents is not archived. Such archive entries are restored as symbolic links or reparse points when extracting. Supported for RAR 5.0 archives only.

You may need to run WinRAR as administrator to create symbolic links when extracting.

This switch is the command line equivalent of Store symbolic links as links group of options in "Archive name and parameters" dialog.


Switch -OR - rename files automatically

Rename extracted files automatically if file with the same name already exists. Renamed file will get the name like 'filename(N).txt', where 'filename.txt' is the original file name and 'N' is a number starting from 1 and incrementing if file exists.


Switch -OS - save NTFS streams

This switch has meaning only for NTFS file system and allows to save alternative data streams associated with a file. You may need to specify it when archiving if you use software storing data in alternative streams and wish to preserve these streams.

Streams are not saved for NTFS encrypted files.

Shell mode equivalent of this switch is the "Save file streams" option in the Archive name and parameters dialog.

This switch is supported only for RAR archives.


Switch -OW - process file security information

Use this switch when archiving to save file security information and when extracting to restore it.

WinRAR stores file owner, group, file permissions and audit information with this switch, but only if you have necessary privileges to read them. Note that only NTFS file system supports the file based security.

Shell mode equivalent of this switch is the "Save file security data" option in the Archive name and parameters dialog.

This switch is supported only for RAR archives.


Switch -O[+|-] - set the overwrite mode

This switch can be used both when extracting and updating archived files. Following modes are available:

-o | Ask before overwrite (default for extracting files)
-o+ | Overwrite all (default for updating archived files);
-o- | Skip existing files.


Switch -P[pwd] - set password

Set password <pwd> to encrypt files when archiving or to decrypt when extracting. Passwords are case-sensitive. Maximum password length is 127 characters. Longer passwords are truncated to this length. If you omit a password in command line, you will be prompted to enter it.

In the shell mode a password may be entered through Enter default password dialog or in the Archive name and parameters dialog.

Example

add the contents of the folder "games" to the archive " secret", using the password ZaBaToAd

WinRAR a -pZaBaToAd -r secret games\*.*

Notes

  1. Use 8 characters or longer passwords for higher security. Avoid passwords which are easy to guess.
  2. Remember your passwords. If you forget a password to encrypted archive, you will not be able to unpack it.


Switch -QO[-|+] - add quick open information [none|force]

RAR archives store every file header containing information such as file name, time, size and attributes immediately before data of described file. This approach is more damage resistant than storing all file headers in a single continuous block, which if broken or truncated would destroy the entire archive contents. But while being more reliable, such file headers scattered around the entire archive are slower to access if we need to quickly open the archive contents in a shell like WinRAR graphical interface.

To improve archive open speed and still not make the entire archive dependent on a single damaged block, RAR 5.0 archives can include an optional quick open record. Such record is added to the end of archive and contains copies of file names and other file information stored in a single continuous block additionaly to normal file headers inside of archive. Since the block is continuous, its contents can be read quickly, without necessity to perform a lot of disk seek operations. Every file header in this block is protected with a checksum. If WinRAR detects that quick open information is damaged, it resorts to reading individual headers from inside of archive, so damage resistance is not lessened.

Quick open record contains the full copy of file header, which may be several tens or hundreds of bytes per file, increasing the archive size by the same amount. This size increase is most noticeable for many small files, when file data size is comparable to file header. So by default, if no -qo is specified or -qo without parameter is used, WinRAR stores copies of headers only for relatively large files and continues to use local headers for smaller files. Concrete file size threshold can depend on WinRAR version. Such approach provides a reasonable open speed to archive size tradeoff. If you prefer to have the maximum archive open speed regardless of size, you can use -qo+ to store copies of all file headers. If you need to have the smallest possible archive and do not care about archive open speed in different programs, specify -qo- to exclude the quick open information completely.

If you wish to measure the performance effect of this switch, be sure that archive contents is not stored in a disk cache. No real disk seeks are performed for cached archive file, making access to file headers fast even without quick open record.

This switch is the command line equivalent of Quick open information group of options in "Archive name and parameters" dialog.


Switch -R - recurse subfolders

Enables subfolder recursion. May be used with the commands: a, u, f, m, x, e, t, k, rr, c and s.

When used with the commands a, u, f or m, files in all sub-folders will be processed as well as in the current working folder.

When used with the commands x, e, t, k, rr, c or s, archives in all sub-folders will be processed as well as in the current working folder.

Examples:

  1. add the contents of the disk C to the archive Backup

WinRAR a -r Backup c:\*.*

  2. test all *.rar archives on the current disk

WinRAR t -r \*.rar


Switch -R- - disable recursion

Disable the subfolder recursion.

Even without -r switch WinRAR can enable the recursion automatically in some situations. Switch -r- prohibits it.

If you specify a folder name when archiving and if such name does not include wildcards, by default WinRAR adds the folder contents even if switch -r is not specified. Also WinRAR automatically enables the recursion if disk root without wildcards is specified as a file mask. Switch -r- disables such behavior.

For example:

WinRAR a -r- arc dirname

command will add only the empty 'dirname' folder and ignore its contents. Following command:

WinRAR a -r- arc c:\

will compress contents of root c: folder only and will not recurse into subfolders.


Switch -R0 - recurse subfolders for wildcard names only

Similar to switch -r, but when used with the commands a, u, f, m will recurse subfolders only for those file masks, which include wildcard characters '*' and '?'.

This switch works only for file names. Folder names without a file name part, such as 'foldername', are not affected by -r0 and their contents is added to archive completely unless -r- switch is specified.

Example

add all *.doc files from the current folder and its subfolders and file readme.txt only from the current folder to docs.rar archive. In case of usual -r switch, WinRAR would search for readme.txt in subfolders too.

WinRAR a -r0 docs.rar *.doc readme.txt


Switch -RI<p>[:<s>] - set priority and sleep time

This switch regulates system load by WinRAR. Possible task priority <p> values are 0 - 15.

If <p> is 0, WinRAR uses the default task priority. <p> equal to 1 sets the lowest possible priority, 15 - the highest possible.

Sleep time <s> is a value from 0 to 1000 (milliseconds). This is a period of time that WinRAR gives back to the system after every read or write operation while compressing or extracting. Non-zero <s> may be useful if you need to reduce system load even more than can be achieved with <p> parameter.

Example

execute WinRAR with default priority and 10 ms sleep time:

WinRAR a -ri0:10 backup *.*


Switch -RR[N] - add data recovery record

This switch is used when creating or modifying RAR archive to add the data recovery record to archive. For RAR 4.x format 'N' parameter can be either the number of recovery sectors (n=1… 524288) or percent of archive size if '%' or 'p' modifers are specified after 'N'. For RAR 5.0 archives 'N' is always the percent of archive size regardless of persence of modifiers.

Syntax of this switch is similar to "RR[N]" command. Please read RR[N] command description and recovery record topic for more details.

Shell mode equivalent of this switch is the "Add recovery record" option in the Archive name and parameters dialog.

Example

add all *.txt files from the current folder to the archive Books and set the recovery record size to 3% of the total archive size

WinRAR a -rr3p Books *.txt


Switch -RV[N] - create recovery volumes

This switch is used when creating RAR multivolume archive to generate recovery volumes. Its syntax is equal to rv command.


Switch -S - create solid archive

Solid is a special archive type. Solid archiving significantly improves the compression ratio at the cost of archive update speed. This switch is meaningful only when creating a new RAR archive.

Shell mode equivalent of this switch is the "Create solid archive" option in Archive name and parameters dialog.

Example

add all *.c and *.h files from the current folder to the solid archive Sources

WinRAR a -s Sources *.c *.h

Please refer to the Solid archives chapter for further information.


Switch -S<N> - create solid groups using file count

Similar to -s, but resets solid statistics after compressing <N> files. Usually decreases compression, but also decreases data losses in case of solid archive damage.


Switch -SC<charset>[objects] - specify the character set

This switch allows to specify the character set for list files, log files and archive comment files.

'Charset' parameter is mandatory and can have one of the following values:

U | Unicode
A | Native single byte encoding, which is ANSI for Windows
O | OEM (DOS) encoding

Files in Unicode format must have FFFE or FEFF Unicode character in the beginning, otherwise WinRAR will ignore this switch and process the file as ASCII text.

'Objects' parameter is optional and can have one of the following values:

G | Log files produced by -ilog switch
L | List files
C | Comment files

It is allowed to specify more than one object, for example, -scolc. If 'objects' parameter is missing, 'charset' is applied to all objects.

This switch allows to specify the character set for files in -z<file> switch, list files and comment files written by cw command.

Examples

  1. Read names contained in 'list' using OEM encoding:

WinRAR a -scol data @list

  2. Read comment.txt as Unicode file:

WinRAR c -scuc -zcomment.txt data

  3. Write comment.txt as Unicode file:

WinRAR cw -scuc data comment.txt


Switch -SE - create solid groups using extension

Similar to -s, but resets solid statistics if file extension is changed. Usually decreases compression, but also decreases data losses in case of solid archive damage.


Switch -SL<size> - process files with size less than specified

Process only those files, which size is less than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes.

Supported only for RAR and ZIP formats.


Switch -SM<size> - process files with size more than specified

Process only those files, which size is more than specified in <size> parameter of this switch. Parameter <size> must be specified in bytes.

Supported only for RAR and ZIP formats.


Switch -SV - create independent solid volumes

By default WinRAR tries to reset solid statistics as soon as possible when starting a new volume, but only if enough data was packed after a previous reset (at least a few megabytes). This switch forces WinRAR to ignore packed data size and attempt to reset statistics for volumes of any size. It decreases compression, but increases chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged.

Note that sometimes WinRAR cannot reset statistics even using this switch. For example, it cannot be done when compressing one large file split between several volumes. WinRAR is able to reset solid statistics only between separate files, but not inside of single file.

Ignored if used when creating a non-volume archive.

Also you may put this option to RAR environment variable to use it in WinRAR shell.


Switch -SV- - create dependent solid volumes

Disables to reset solid statistics between volumes. It slightly increases compression, but significantly reduces chances to extract a part of data if one of several solid volumes in a volume set was lost or damaged.

Ignored if used when creating a non-volume archive.

Also you may put this option to RAR environment variable to use it in WinRAR shell.

See also: switch -sv


Switch -S- - disable solid archiving

Do not use solid archiving even if it was enabled in the default compression profile.


Switch -SFX[name] - create self-extracting archive

If this switch is used when creating a new archive, a self-extracting archive (SFX) will be created. By default WinRAR uses as its SFX module the file Default.SFX for RAR archives and Zip.SFX for ZIP archives. These modules must be in the same folder as winrar.exe. It is possible to specify in the "-sfx" switch an alternate SFX module name.

Shell mode equivalent of this switch is the "Create SFX archive" option in the Archive name and parameters dialog.

Examples

  1. create self-extracting solid volumes

WinRAR a -sfx -v360 -s Games

  2. create archive using WinCon.SFX module

WinRAR a -sfxWinCon.SFX Gift.rar

See also s[name] command.


Switch -T - test files after archiving

Test files after archiving. This switch is especially useful in combination with the move command, so files will be deleted only if the archive had been successfully tested.


Switch -TA<date> - process files modified after the specified date

Process only files modified after the specified date.

Format of the date string is YYYYMMDDHHMMSS. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. For example, the following switch is correct: -ta2001-11-20. Internally it will be expanded to -ta20011120000000 and treated as "files modified after 0 hour 0 minutes 0 seconds of 20 November 2001".


Switch -TB<date> - process files modified before the specified date

Process only files modified before the specified date.

Format of the date string is YYYYMMDDHHMMSS. It is allowed to insert separators like '-' or ':' to the date string and omit trailing fields. For example, the following switch is correct: -tb2001-11-20. Internally it will be expanded to -tb20011120000000 and treated as "files modified before 0 hour 0 minutes 0 seconds of 20 November 2001".


Switch -TK - keep original archive time

Prevents WinRAR from modifying the archive time when changing an archive.


Switch -TL - set archive time to newest file

Set the archive time to the time of the newest file in the archive. Forces WinRAR to set the time of a changed archive to the time of the newest file in the archive.


Switch -TN<time> - process files newer than the specified time

Use this switch to process only those files, which are newer than the specified time period. Format of the time string is:

[<ndays>d][<nhours>h][ <nminutes>m][<nseconds>s]

For example, use switch -tn15d to process files newer than 15 days and -tn2h30m to process files newer than 2 hours 30 minutes.


Switch -TO<time> - process files older than the specified time

Use this switch to process only those files, which are older than the specified time period. Format of the time string is:

[<ndays>d][<nhours>h][ <nminutes>m][<nseconds>s]

For example, use switch -to15d to process files older than 15 days and -to2h30m to process files older than 2 hours 30 minutes.


Switch -TS<m,c,a>[N] - save or restore file time (modification, creation, access)

Switch -tsm instructs WinRAR to save file modification time, -tsc - creation time and tsa - last access time.

For RAR 4.x archive format the optional parameter after the switch is the number between 0 and 4 controlling the file time precision. Value '1' enables 1 second precision, 2 - 0.0065536 sec, 3 - 0.0000256 and 4 or '+' enables the maximum NTFS time precision, which is equal to 0.0000001 sec. Value '0' or '-' means that creation and access time are not saved and low (two seconds) precision is used for modification time. Higher precision modes add more data to archive, up to 19 additional bytes per file in case of -tsm4 -tsa4 -tsc4 combination. If no precision is specified, WinRAR uses '4' (high) value.

RAR 5.0 archive format saves file times either with 1 second precision for parameter value '1' or with maximum NTFS precision for '2', '3' and '4'. '0' forces RAR 5.0 archives to omit file time even if it is modification time, so unpacked files will have the current system time.

Default WinRAR mode is -tsm4 -tsc0 -tsa0, so modification time is stored with the high precision and other times are ignored.

It is necessary to specify -tsc and -tsa switches to set creation and access time when unpacking files (precision is irrelevant, but must not be 0). By default WinRAR sets only the modification time, even if archive contains creation and last access time. Setting the modification time to unpacked files may be also disabled with -tsm-.

It is possible to omit the time type letter if you need to apply the switch to all three times. For example, -tsm4 -tsa4 -tsc4 can be replaced by -ts4, -ts+ or -ts. Use -ts- to save only the low precision modification time for RAR 4.x archives, not store file time for RAR 5.0 archives or to ignore all three file times on unpacking.

When creating an archive, WinRAR automatically reduces the precision if high mode is not supported by the file system. It is not more than 2 seconds on FAT and 1 second in Unix. NTFS time precision is 0.0000001 second.

Operating systems limit which time can be set on unpacking. Windows allows to set all three times, Unix - modification and last access, but not creation.

All modes described above are supported only by RAR format. In ZIP archives the high precision modification time is stored in the same data structure as creation and last access times. When archiving to ZIP, all three times are controlled by -ts or -tsm option, while -tsa and -tsc are ignored. Use -ts or -tsm to save all times in high precision format (default ZIP mode), specify -ts- or -tsm- to store only the low precision modification time. When unpacking ZIP archive, -tsm -tsc -tsa switches can be used individually to control corresponding times just like as for RAR format.

Examples

  1. Store all file times with the highest possible precision:

WinRAR a -ts backup

  2. Restore modification and last access time. Switch -tsm is not required, because WinRAR uses it by default:

WinRAR x -tsa backup

  3. Store low precision modification and creation time. Without -tsm1 WinRAR would save the high precision modification time.

WinRAR a -tsm1 -tsc1 backup


Switch -U - update files

May be used with archive extraction or creation. The command string a -u is equivalent to the command u. You could also use the switch "-u" with the command m .

If the switch "-u" is used with the commands x or e, then old files would be replaced only if new versions, extracted from the archive, are more recent, but unlike -f if an archived file has no matching unpacked file, it will still be extracted.

Shell mode equivalent of this switch is the "Add and update files" option in the Archive name and parameters dialog and "Extract and update files" option in the Extraction path and options dialog.

Supported only for RAR and ZIP formats.


Switch -V<n>[k|b|f|m|M|g|G] - create volumes

Create volumes with size=<n> *1000.

By default this switch uses <n> as thousands (1000) of bytes (not 1024 x bytes). You may also enter the size in kilobytes using the symbol 'k', in bytes using the symbol 'b', in megabytes - 'm', millions of bytes - 'M', gigabytes - 'g', billions (milliards) of bytes - 'G' or select one of several predefined values using the symbol 'f' following the numerical value. Predefined values can be 360, 720, 1200, 1440 or 2880 and replaced with corresponding floppy disk size. If the size is omitted, autodetection will be used.

It is allowed to enter decimal fractions using the dot as the decimal mark. For example, -v1.5g means 1.5 gigabytes.

You may specify several -v switches to set different sizes for different volumes. For example:

rar a -v100k -v200k -v300k arcname

sets 100 KB size for first volume, 200 KB for second and 300 KB for all following volumes.

If volumes are created on removable media, then after the creation of the first volume, the user will be prompted with:

Create next volume: Yes/No/Create All

At this moment in time, you should change the disks. Answering 'All' will cause all volumes to be created without a pause.

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support -vn and extension based names.

When extracting or testing a multi-volume archive, you must use only the first volume name. If there is no next volume on the drive, the user will be prompted with:

Insert disk with <next volume name>. OK/Cancel

Insert the disk with the correct volume and press OK.

Archive volumes may not be modified. The commands d, f, u or s can not be used with multi-volume sets. The command a may be used only for the creation of a new multi-volume set.

It is possible, although unlikely, that the file size, of a file in a multi-volume set, could be greater than its uncompressed size. This is due to the fact that 'storing' (no compression if size increases) cannot be enabled for multi-volume sets.

Archive volumes may be solid and/or self-extracting.

Shell mode equivalent of this switch is the "Split to volumes" field in the Archive name and parameters dialog.

Example:

create a 1200000 bytes size solid, self-extracting volumes

WinRAR a -v1200 -s -sfx bitmaps


Switch -VD - erase disk contents before creating volume

All files and folders on the target disk will be erased before starting archiving operation, when '-vd' is used. If you create volumes, erasing will be performed before the creation of each volume, giving you the chance to archive to non-empty removable disks. You must be sure that disks do not contain any useful information.

The switch applies only to removable media, the hard disk cannot be erased using it.


Switch -VER[n] - file version control

Forces WinRAR to keep previous file versions when updating files in the already existing archive. Old versions are renamed to 'filename;n ', where 'n' is the version number. Supported only for RAR archives.

By default, when unpacking an archive without the switch -ver, WinRAR extracts only last added file version, the name of which does not include a numeric suffix. But if you specify a file name exactly, including a version, it will be also unpacked. For example, 'rar x arcname' will unpack only last versions, when 'rar x arcname file.txt;5' will unpack 'file.txt;5', if it is present in the archive.

If you specify -ver switch without a parameter when unpacking, WinRAR will extract all versions of all files that match the entered file mask. In this case a version number is not removed from unpacked file names. You may also extract a concrete file version specifying its number as -ver parameter. It will tell WinRAR to unpack only this version and remove a version number from file names. For example, 'rar x -ver5 arcname' will unpack only 5th file versions.

If you specify 'n' parameter when archiving, it will limit the maximum number of file versions stored in the archive. Old file versions exceeding this threshold will be removed.


Switch -VN - use the old style volume naming scheme

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using -vn switch it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99.

RAR 5.0 archives do not support -vn and extension based names.


Switch -VP - pause before each volume

By default WinRAR asks for confirmation before processing next volume only when archiving to removable disks and only if free disk space is less than volume size. This switch forces WinRAR to always ask for such confirmation when creating or extracting volumes. For example, it can be useful if you wish to copy new volumes to another media immediately after creating.


Switch -W<path> - set folder for temporary files

WinRAR needs to create temporary files and folders in some operations like archive modification. By default it creates them in folder specified in "Folder for temporary files" field of Paths page in "Settings" dialog. When you use WinRAR in command line mode, you can override this parameter with -w<path> switch.

Example:

use d:\tmp folder for temporary files, when adding a new comment to info.rar

WinRAR c -wd:\tmp -zcomment.txt info.rar


Switch -X<file> - exclude specified file

Exclude the specified file or folder from operation. Wildcards can be used in both the name and path parts of file mask. You can specify the switch -x several times to define several exclusion masks in the same command line.

If mask contains wildcards, it applies to files in current folder and its subfolders. It is not recursive without wildcards, so "filename" mask will exclude 'filename' file only in current folder when archiving or in root archive folder when extracting.

Use "*\filename" syntax to exclude "filename" recursively in all folders.

If you know the exact path to file, you can use "path\filename" syntax to exclude only this copy of "filename". If you use -xpath\filename syntax when unpacking an archive, "path" must be the path inside of archive, not the file path on the disk after unpacking.

By default, masks containing wildcards are applied only to files. If you need a mask with wildcards to exclude several folders, use the special syntax for folder exclusion masks. Such masks must have the trailing \ character. For example, "*tmp*\" mask will exclude all folders matching "*tmp*" and "*\tmp\" will exclude all 'tmp' folders. Since wildcards are present, both masks will be applied to contents of current folder and all its subfolders. Folder exclusion masks are supported for RAR and ZIP formats only.

If you wish to exclude only one folder, specify the exact name of folder including the absolute or relative path without any wildcards. In this case you do not need to append the path separator to mask, which is required only for folder exclusion masks containing wildcards to distinguish them from file exclusion masks.

Examples

  1. compress all files except *.jpg and *.avi in current folder and its subfolders

WinRAR a -r -x*.jpg -x*.avi rawfiles

  2. compress all files on the disk c: except temp folders and files inside of temp folders

WinRAR a -r -x*\temp\ savec c:\*

  3. extract all files except *.txt from docs.rar

WinRAR x -x*.txt docs


Switch -X@<listfile> - exclude files using a specified list file

Switch -X@<listfile> - exclude files listed in the specified list file

Exclude files which names are present in the listfile <listfile>

Example

add all *.exe files, except those which names are present in the list.txt, to the archive bin

WinRAR a -x@list.txt bin *.exe


Switch -Y - assume Yes on all queries

If this switch is specified, Yes will be the default and automatic reply to all queries.


Switch -Z<file> - read archive comment from file

If this switch is specified with any archive modification command, the archive comment is read from the file and added to archive. Use with -sc switch if you need to specify the character set for comment text file.

Example

add all files from the current folder to the solid archive Receipts with an archive comment from file Receipts.diz

WinRAR a -zReceipts.diz -s Receipts


List of WinRAR exit codes

WinRAR exits with a zero code (0) in case of successful operation. Non-zero exit code indicates some kind of error:

Code value | Description
0 | Successful operation.
1 | Warning. Non fatal error(s) occurred.
2 | A fatal error occurred.
3 | Invalid checksum. Data is damaged.
4 | Attempt to modify a locked archive.
5 | Write error.
6 | File open error.
7 | Wrong command line option.
8 | Not enough memory.
9 | File create error.
10 | No files matching the specified mask and options were found.
11 | Wrong password.
255 | User break.


General settings

General settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "General" tab. The dialog contents are described below.

System/Low priority

WinRAR uses this parameter to regulate system load in a multitasking environment. Usually the default priority is the best choice, so you do not need to activate this option, but if you frequently run WinRAR in the background while working with other applications, you may wish to set low priority.

System/Multithreading

If enabled, WinRAR will use the multithreaded version of compression algorithm providing the higher speed on multiprocessor or multicore architectures. By default this option is turned on if number of processors reported by the operating system is more than one, but it is possible to enable it manually even in a single processor system.

This option affects not only compression, but also other WinRAR modules, which can start several threads. Usually its default state proposed by WinRAR is optimal, so normally you do not need to change it.

History/Keep archives history

By default WinRAR keeps names of a few recently opened archives in File menu, so you may quickly access them again. But if you need to disable it, for example, for security purposes, you may clear this option.

Also, if this option is on, WinRAR adds opened archives to Windows recent documents list. If "Keep archives history" is off, Windows maintains the recent documents list itself and in such case archive names may or may not be added to it depending on Windows version and settings.

History/Allow history in dialogs

Some input fields in many WinRAR dialogs support lists of previously entered strings, which allow to restore a earlier entered value (an archive name, destination path, etc.) quickly. It may save user's time, but like the previous option, security of such feature may be questionable in multi-user environment. So if you share your computer with other people, you may wish to disable it.

Toolbar/Large buttons

Choose large (48x36 pixels) or small (24x24) buttons. Available only with the default WinRAR interface theme.

Toolbar/Show buttons text

Controls displaying of button titles.

Toolbar/Lock toolbars

Prevent moving or resizing toolbars by user. You may enable this option to avoid an accidental modification of toolbars position or size after you already customized toolbars to your needs.

Toolbar/Toolbars…

Activates the dialog allowing to turn on or off the main WinRAR toolbar, the additional small toolbar containing "Up one level" button and address bar with path or archive information.

Toolbar/Buttons…

Press "Buttons…" to open the dialog, where you may choose toolbar buttons.

Interface/Activate Wizard on start

Switch WinRAR to Wizard mode, just after it started.

Interface/Enable sound

Enable WinRAR to produce sounds in case of errors or finishing long operations.

Interface/Show archive comment

Display comment window, if an opened archive has a comment.

Interface/Reuse existing window

If an attempt is made to open a new archive executing "WinRAR <arcname>" command or clicking on archive icon and a WinRAR window already exists, the archive will be opened in the already existing window. If this option is not enabled, a new window will be created.

Interface/Always on top

Place WinRAR window above all other programs. You may set it if you frequently use WinRAR as a drag and drop target.

Interface/Windows progress bars

This option controls look of progress bars in window displaying archiving and extraction progress. If enabled, WinRAR will use standard Windows progress bars. If disabled, WinRAR version of progress bars will be used. It may be reasonable to turn this option off in older Windows versions and enable it in Windows Vista and later, where controls have a new impressive look. Note that Windows progress bars are two color only, so unlike WinRAR progress bars they do not indicate the current compression ratio. But the compression percent is also displayed in separate line of progress window.

Interface/Taskbar progress bar

If this option is enabled, WinRAR will display the total progress of operation also on WinRAR icon on Windows taskbar. Taskbar progress feature is available only beginning from Windows 7, so "Taskbar progress bar" option is disabled in older Windows versions.

Logging/Log errors to file

Write error messages and information on archive damage to the file rar.log in %APPDATA%\WinRAR folder. This option is available only after registration. Use "View log…" command in Options menu to view contents of log file.

Logging/Limit log file size to <nnn> KB

Enables to limit size of rar.log file produced by WinRAR. The minimum allowed log file value is 50KB.


Compression settings

Compression settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Compression" tab. The dialog contents are described below. Note that most of compression options can be specified via the Compression profiles/Create default button.

More details about different compression parameters can be found in How to choose optimal archiving settings topic.

Compression profiles/Create default

In the dialog displayed after pressing this button you may specify default values for most compression options. Online help is available for all sections of the dialog, simply press "Help" button at any time to read detailed options description.

Options entered in this dialog are stored in the default compression profile, which name is "Default Profile", and are automatically restored before every archiving operation.

Some parameters of default compression profile are used not only when adding files to archive, but in other archive modification operations like deleting or renaming files. In this case WinRAR reads only those parameters, which are suitable for current operation. Extraction does not use any options from the default compression profile.

Compression profiles/Organize

Opens the dialog to organize compression profiles. In this Organize profiles dialog you may delete existing profiles or edit their parameters. For example, you may rename a profile or set it as default. Read online help associated with this dialog for more information.

Volume size list/Define volume sizes…

This button activates Define volume sizes dialog. Here you can customize the list of predefined volume sizes associated with "Split to volumes, size" field in Archive name and parameters dialog.

Default folder for archives

If this field is not empty and an archive name does not contain a full path, an archive will be created in the specified folder. For example, if you entered the path to your Desktop, archives created by WinRAR will appear on the Desktop.

If this field is empty and an archive name does not contain a full path, archives will be created in the same folder as the files archived.

In the command line mode -cfg- switch disables most of WinRAR settings including the default folder for archives.

Default folder for extracted files

You may enter here a name of the folder, which will be used as a base to construct the destination folder in Extract without confirmation and Extract files to the specified folder commands. WinRAR builds the destination path in these extraction commands merging the default folder and an archive name. It may be convenient to enter Desktop path here, so you will immediately see unpacked data on your Desktop.

Unlike the default folder for archives, the default folder for extracted files is not used in the command line mode and in context menus.

Append archive name to path

It controls if archive name is appended to the default folder name when constructing the destination path.

Remove redundant folders from extraction path

This option works only in context menus, only for single selected archive with single folder and no files in archive root folder and only for "Extract to DestName\" command, where 'DestName' is a name of folder proposed by WinRAR and based on archive name. If all these conditions are met, this option removes the top level folder based on archive name from extraction path.

For example, if you have Pictures.rar containing all files in 'Samples' folder and if you unpack it with "Extract to Pictures\" context menu command, WinRAR will place files to "Pictures\Samples" if this option is off and to "Samples" if it is on. So it helps to save one click, avoiding necessity to open 'Pictures' folder, which contains nothing but 'Samples'.

This option introduces an additional delay in the beginning of extraction, because WinRAR needs to scan an archive and analyze its folder structure. Note that context menu still displays the archive based folder name even if it will be removed from path when extracting. Showing the correct folder already in context menu would introduce a potentially annoying delay between right clicking an archive and displaying the context menu.


Paths settings

Paths settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Paths" tab. The dialog contents are described below.

Folder for temporary files

WinRAR uses this folder to create temporary files. If this field is blank, temporary files and folders will be created either in the current folder or in Windows temporary folder, depending on command type.

Initial state of this parameter is the standard Windows temporary folder. If you changed it and wish to revert it back to Windows temporary folder later, you can enter %temp% instead of folder name. WinRAR will expand it to Windows temporary folder name before creating temporary files.

Folder for temporary files/Use only for removable disks

For hard disks generally it is faster to create a temporary archive in the current folder, but for slow external disks it may be more efficient to create an archive on a hard disk and then copy it to external disk. To implement such behavior you should specify Folder for temporary files and turn on Use only for removable disks option.

Use only for removable disks option affects only those commands which involve archive modification. Other commands would not benefit from it, so they ignore the current disk type.

Folder for temporary files/Browse

Press this button to select temporary folder from tree.

Start-up folder

You may enter here a folder, which will be opened each time when WinRAR is started. This option has meaning only if Restore last working folder on start-up option is switched off, otherwise last opened folder will be set.

Start-up folder/Restore last working folder on start-up

If this option is enabled, WinRAR will set last viewed folder, when executed without parameters.

Start-up folder/Browse

Press this button to browse for start-up folder.


File list settings

File list settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "File list" tab. The dialog contents are described below.

List type (List view or Details)

Selects either List view (multicolumn, only file icons are displayed) or Details view (single column, an additional size, date and type information is provided for each file). The default mode is Details view.

List style/Show grid lines

Show grid lines in the file list.

List style/Full row select

Use the full row cursor.

Files/Show archives first

Display archives in the file list before all other files regardless the current sort mode.

Files/Allow all uppercase names

By default WinRAR displays uppercase file names as is. Switching this option off forces WinRAR to show such names in lowercase.

Files/Show encrypted or compressed NTFS files in color

If enabled, WinRAR will display files with NTFS "Compressed" and "Encrypted" attributes using the same colors as Explorer. By default these are blue color for "Compressed" and green for "Encrypted" attribute.

Files/Merge volumes contents

If this option is enabled and you open the first volume, WinRAR also tries to read and display contents of all next volumes available in the same folder as the first volume. So instead of looking at files contained only in the first volume, you will see files contained in the first and all following volumes.

Files/Show seconds

Display seconds in file dates in the file list. Without this option WinRAR displays dates in file list with 1 minute precision.

Files/Set font…

Select font for the file list.

Selection

Here you may set different styles of mouse selection in the list. Set "Single click to open an item", if you wish Internet browsers style selection. In this mode you also may choose if you need to underline file names. The default WinRAR mode is "Double click to open an item"


Viewer settings

Viewer settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Viewer" tab. The dialog contents are described below.

Viewer type

Selects default action, when the user presses Enter on a file. Possible actions are:

Internal viewer | Use the internal WinRAR viewer
External viewer | Use an external viewer. You should define the name in the "External viewer name" field
Associated program | Use default Windows viewer for file type
Ask | Ask the user for the desired viewer type each time after pressing Enter

These settings are ignored for some file types. In the file management mode they are ignored for archives and executables. On Enter WinRAR always tries to open archives and to run exe files. In the archive management mode they are ignored for file types specified in "Unpack everything for" field of viewer settings dialog. If Enter is pressed on such file, WinRAR extracts the entire archive contents to a temporary folder, runs a file, waits for it to terminate, updates the source archive if necessary and then deletes the temporary folder and all of its contents. This provides the convenient method of installing applications directly from archives.

Unlike Enter, View file command always opens a file in the internal WinRAR viewer.

Internal viewer/Use DOS encoding

If internal viewer detects the file contents as Unicode UTF-8 or UTF-16 little endian, it selects these encodings automatically. For the rest of files, which are not detected as Unicode, the initial code page is set as Windows text if "Use DOS encoding" is off and as DOS text if this option on. It is also possible to change encoding of already opened file using "View as…" commands in internal viewer "View" menu.

Internal viewer/Reuse existing window

If this option is off, WinRAR creates a separate internal viewer window for each viewing file. When the option is on, the already existing window is reused, so only one instance of the viewer is opened.

Internal viewer/Word wrap

Switches between wrapping long strings and scrolling modes in the internal viewer. This option affects only new viewer windows, already opened are not changed.

Unpack everything for

Here you may define file masks which require unpacking of complete archive contents, when user presses Enter or double clicks an archived file matching one of these masks. Masks must be separated by spaces. For example, if this field contains *.exe *.htm *.html, WinRAR will unpack the complete archive before opening an archived executable or HTML file. This option is necessary for those file types, which need to access other archived files for proper executing or viewing.

WinRAR ignores "Viewer type" setting for file types defined in "Unpack everything for" field and always opens them using an associated program.

Ignore modifications for

By default, WinRAR proposes to update an archive if viewer modified an opened file or created any new files, but it is possible to disable such behavior. You can enter one or several file masks separated by spaces in "Ignore modifications for" field and WinRAR will not prompt to update an archive if file created or modified by viewer matches one of these masks.

For example, if this field contains *.doc *.txt, any .doc and .txt files modified or created by external or associated viewer, will be ignored and any changes made by user in such files while viewing them will be lost. If you wish to disable archive updating for all viewed files, use * mask.

Masks in this option can have more complex syntax, combining archive and file mask separated by two backslash characters: arcmask\\filemask. Masks can include the path, which limits archives or files to specified folder and its subfolders. You can use environment variables in the path. It is allowed to omit 'arcmask\\' or 'filemask' components if you wish to match all archives or all files.

For example, *.rar\\*.txt means all .txt files in all .rar archives, *\\temp\* or just temp\* matches all files in 'temp' folders inside of archives and %temp%\*\\* or %temp%\*\\ instructs the viewer to not update any archives in Windows temporary folder.

External viewer name

You may enter here the name of program, which will be used as viewer, if you set option "On Enter run external viewer". A name of the file to view will be passed to this program as a single parameter.


Security settings

Security settings dialog

To activate this dialog select "Settings…" command in Options menu and click on "Security" tab. The dialog contents are described below.

File types to exclude from extracting

If you enable this option, you can specify the list of potentially dangerous file masks in input field below. It is allowed to enter several masks separated by spaces. WinRAR will skip files matching any of these masks when extracting or opening archived files.

This option may help to protect users from infected email attachments. For example, if you enter:

*.scr *.pif *.exe

in this field, it will prohibit users to unpack, view and run .scr, .pif and .exe files with WinRAR.

Wipe temporary files

This group of options controls the delete mode for temporary files in WinRAR temporary folder generated when processing already existing archives. It involves external or internal viewer operations, executing an archived file or unpacking with the drag and drop.

Wipe temporary files/Never

If "Never" is selected, temporary files are removed using the standard system delete function and they can be recovered with special software sometimes. This is a fastest, but less secure way to deal with temporary files.

Wipe temporary files/Always

In "Always" mode, before deleting temporary files are overwritten by zero bytes to prevent their recovery. This is a noticeably slower and more secure approach.

Wipe temporary files/Encrypted only

If you selected "Encrypted only", temporary files are removed with the secure and slow wipe function if WinRAR identified an archive containing these files as encrypted. Otherwise a quick standard delete is applied.

Notes to "Wipe temporary files" options

  • Wipe operation is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.
  • If temporary files are still in use, WinRAR may not delete them immediately. Instead, when you run WinRAR the next time, all temporary files older than one hour will be deleted or wiped out. The same happens if WinRAR cannot reliably detect if temporary files are still in use by external application.
  • This option works only with temporary files created after extraction operations. It does not work with different kind of temporary files like those created when modifying an archive. Such files are always removed with the standard quick delete.

Propose to select virus scanner

This option modifies behavior of Scan archive for viruses command. By default it is enabled, so WinRAR proposes to select virus scanner name and parameters every time when activating the virus scanning command. If you use only one antivirus, it is possible to skip the antivirus selection step by turning this option off.


Integration settings

Integration settings dialog

To activate this dialog in WinRAR select "Settings…" command in Options menu and click on "Integration" tab. The same set of options also is available when installing WinRAR, so it is possible to change the described below options both during installation and later, in WinRAR settings.

Associate WinRAR with (RAR, ZIP, CAB, ARJ, LZH, etc.)

Associate WinRAR as default viewer for selected formats. It is reasonable to leave these options selected, so you can open archives in WinRAR by double clicking on archive name or icon in Explorer or Desktop. "Toggle all" button selects all formats at once or deselects them if all they are already selected.

User defined archive extensions

Here you can specify additional file name extensions for archive formats supported by WinRAR. For example, if you have files with ".001" extension, which are in RAR format, you can enter "001" in this field to associate WinRAR with such files and add extraction commands to context menus displayed for "001" files in Windows shell. If you need to enter several extensions, separate them by spaces.

This option is available only in WinRAR settings, but not in WinRAR installer.

Interface/Add WinRAR to Desktop

Add WinRAR icon to the Desktop.

Interface/Add WinRAR to Start Menu

Add WinRAR icon to the Start Menu.

This option adds WinRAR icon to top level of classic style Start Menu in Windows XP. Starting from Windows Vista, programs cannot add themselves to the top of the Start menu, so this option adds WinRAR icon to "All Programs" list. You can use "Pin to Start Menu" Windows command if you need to add an application icon to top of Start Menu in Windows Vista and newer.

Interface/Create WinRAR program group

Create a WinRAR program group in Start Menu/Programs.

Shell integration/Integrate WinRAR into shell

Allows the use of context menus and drag and drop for handling WinRAR archives.

Shell integration/Cascaded context menus

Place all items added by WinRAR to file and archive context menus into submenu.

Shell integration/Icons in context menus

Add small icons to items added by WinRAR to file and archive context menus.

Shell integration/Context menu items

Choose items to display in Explorer context menus.


Compression profiles

Compression profile is a set of different compression options, which can be quickly retrieved before starting an archiving operation. Instead of specifying an archive type, a volume size, a compression method and other options each time when you need to make a new archive, you may create several profiles storing options for your typical archiving operations and later select a required profile from the menu to restore all the options.

Compression profiles have user assigned names displayed in the profiles list. You may select a profile in Archive name and parameters dialog, just press the "Profiles" button, choose a required profile name in the drop down list and all options saved in the profile will be restored. WinRAR provides a few predefined profiles, for example, for creating an e-mail attachment and for files backup, but you may delete them if you wish.

There are two ways to create a new profile. You may open "Archive name and parameters" dialog, set the desired options, press the button "Profiles" and select the menu item "Save current settings to a new profile". Appearing Profile parameters dialog contains the profile name field, where you should enter a name of the new profile. A few profile options are also available in this dialog. The most important option is "Set profile as default". If you set it, the profile will be automatically selected before every archiving and some archive modification operations. Other options allow to save archive and file names, create a shortcut on Desktop and immediately run archiving after selecting a profile. Read the description of the Profile parameters dialog for detailed information about these options.

Another method of creating a new profile is to press "Create default" button in Compression settings dialog. In this case you only need to set desired archiving options in the displayed dialog and press "OK" button. The new profile created by this method becomes the default profile with the name "Default Profile". Unlike the first, this method does not provide access to advanced profile parameters such as storing archive and file names or creating a shortcut and it is convenient to create the default profile without additional questions. But if you need more flexibility, use the first method.

You cannot change compression options stored in a profile, but it is possible to change profile parameters, for example, its name or default status. To edit profile parameters or to delete existing profiles use the Organize profiles command, which is accessible from both the profiles menu in "Archive name and parameters" dialog and from the "Compression settings" dialog. Using this command you may assign a new profile as default or remove the default status from profile.

It is possible to store a password in profile, but please be aware that it is stored in Registry in insecure format. So anybody having access to your computer may be able to retrieve the stored password.


WinRAR.ini file

By default WinRAR stores settings in Registry. Such approach is reasonable when WinRAR is installed and used on the same single computer. But if you plan to install WinRAR on removable media, such as USB flash drive, and then run it on different computers occasionally, you may prefer to avoid storing any WinRAR specific data in Registry on those computers.

It is possible to redirect WinRAR Registry access to text file. If you create an empty WinRAR.ini file either in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder, WinRAR will redirect access to HKEY_CURRENT_USER\Software\WinRAR and HKEY_LOCAL_MACHINE\Software\WinRAR Registry keys to this file. WinRAR searchs for this file first in its own folder and next in %APPDATA%\WinRAR.

Use "Create WinRAR.ini file" command in "Import/Export" submenu to create a new WinRAR.ini file and copy existing WinRAR settings from Registry to this file. You need to copy a file created with this command either to WinRAR own folder or to %APPDATA%\WinRAR to make it active.

Typically current settings are written to WinRAR.ini only on exit, until that they are stored in memory. They are saved as case sensitive UTF-16LE text strings in following format:

<root key>\<key name>=value

where <root key> can be HKCU for HKEY_CURRENT_USER, HKLM for HKEY_LOCAL_MACHINE and Global for global settings added by user manually. String values are enclosed in quote marks and byte arrays have "bin:" prefix.

You can change global settings to control WinRAR.ini behavior. If write access to WinRAR.ini is not disabled, WinRAR creates strings listed below automatically and you need to edit a parameter after "=" to change an option. These strings are created at the top of WinRAR.ini. If you disabled write access with read-only attribute, you can add an appropriate string to WinRAR.ini manually, one command per line. All these strings use UTF-16LE encoding and are case sensitive, enter them exactly as mentioned here. Following global settings are available:

Global\AppData=0

Prohibit WinRAR to access APPDATA%\WinRAR folder. All files normally stored in this folder, such as registration key or interface themes, should be stored in the same folder as WinRAR.exe if Global\AppData=0 is specified. Specify Global\AppData=1 to allow access to APPDATA%\WinRAR.

Global\Integration=0

While WinRAR redirects its branches of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE Registry keys to WinRAR.ini, it still writes data to HKEY_CLASSES_ROOT and other parts of Registry required to properly set the shell extension and file associations. For example, it happens when using Integration settings dialog. If you wish to prohibit any operations with Registry, add Global\Integration=0 to WinRAR.ini. WinRAR will not be able to change system integration settings after that. This command also prohibits creating or deleting WinRAR shortcut on Desktop and WinRAR program group. Specify Global\Integration=1 to allow system integration.

Global\SaveSettings=0

Disable writing current settings back to WinRAR.ini, so any configuration changes made in current WinRAR copy will be lost on exit. You can achieve the same result by setting read-only attribute to WinRAR.ini file. It is reasonable to configure WinRAR as you wish first, close WinRAR to store settings to file and only then add Global\SaveSettings=0 command. This mode may also affect other WinRAR components relying on WinRAR.ini, such as the shell extension not seeing changes in Context menu items dialog. Specify Global\SaveSettings=1 to allow saving settings to WinRAR.ini.

Notes

  • Unlike other Registry variables, "AppData" variable is not redirected to WinRAR.ini and always read from Registry. This variable defines location of %APPDATA%\WinRAR folder and since WinRAR.ini can be stored in this folder, we need to know a value of this variable before accessing WinRAR.ini.


RAR environment variable

Default switches may be added to the Windows environment variable, RAR, using the SET command. Most of switches specified in this variable are used only when WinRAR executed in the command line mode. Switches -cl, -cu, -tk , -tl, -p are used both in shell and in command line modes.

Example

The command

SET RAR=-s -m5 -md1024

will force WinRAR to create solid archives using best compression and a 1024 KB dictionary when executed in the command line mode.


Registry variables

In multi-user environment it may be important to disable access to some of WinRAR functions for security reasons. If you need to do it, create Registry key:

HKEY_LOCAL_MACHINE\Software\WinRAR\Policy

or

HKEY_CURRENT_USER\Software\WinRAR\Policy

Key in HKEY_LOCAL_MACHINE has a higher priority than in HKEY_CURRENT_USER.

This key may contain the following values:

Value name | Value type | Description
Menu | DWORD | If set to 0, disables WinRAR main menu.
Settings | DWORD | If set to 0, disables "Settings" dialog, "Import/Export settings" commands and toolbar context menu.
Password | DWORD | If set to 0, disables change of archiving password. It may help to avoid encrypting of important data.
OrgPasswords | DWORD | If set to 0, access to "Organize passwords" dialog is disabled. It does not disable access to passwords already stored in this dialog, so you may need to delete them before setting OrgPasswords variable.
Shutdown | DWORD | If set to 0, disables "Turn PC off when done" archiving option, so a user cannot shutdown computer.
Benchmark | DWORD | If set to 0, disables "Benchmark" command. In multi-user environment "Benchmark" command might abuse shared computational resources.

It might be necessary to restart WinRAR after policy change. Policy key does not affect the console RAR (rar.exe file), so for better security in multi-user environment you may need to delete Rar.exe and keep only WinRAR.exe.

Also you can override the location of %APPDATA%\WinRAR folder, specifying a new path to WinRAR supplementary files in string value "AppData" of HKEY_CURRENT_USER\Software\WinRAR\Paths Registry key.


RARFILES.LST - set file order in solid archives

Files in a solid archive are usually sorted by extension. It is possible to set an alternative file order using a special file, rarfiles.lst (this should be in the same folder as WinRAR.exe or in %APPDATA%\WinRAR folder). It is already provided in the WinRAR distributive, but may be customized for user files set. This is a plain text file, which defines the order of files when a solid archive is created. The file rarfiles.lst may contain file names, wildcards and a special entry - $default. The default entry defines the place in the order list for files not matched with other entries in rarfiles.lst.

Tips to provide improved compression and speed of operation:

  • Similar files should be grouped together in the archive if possible;
  • Frequently accessed files should be placed at the beginning.

Normally masks placed nearer to the top of list have a higher priority, but there is an exception from this rule. If rarfiles.lst contains such two masks that all files matched by one mask are also matched by another, that mask which matches a smaller subset of file names will have a higher priority regardless of its position in the list. For example, if you have *.cpp and f*.cpp masks, f*.cpp has a higher priority, so the position of 'filename.cpp' will be chosen according to 'f*.cpp', not '*.cpp'.

Example:

this is the simple example of rarfiles.lst
file_id.diz
readme.*
*.doc
*.txt
*.hlp
*.inf
*.exe
*.dll
$default
*.rar


GUI RAR and ZIP SFX modules (Default.SFX and Zip.SFX)

Using these two modules you may create GUI (graphic mode) self-extracting archives for Windows.

Use Default.SFX module for RAR archives and Zip.SFX for ZIP archives.

WinRAR x64 also includes Default64.SFX and Zip64.SFX, which are 64 bit versions of these SFX modules. By default WinRAR x64 uses 32 bit versions, but you can select 64 bit modules explicitly in SFX options: Module dialog. Resulting 64 bit SFX archive will work only in Windows x64.

Both these modules support simple setup commands and command line options. Use links below to read more about it:

  • SFX setup commands;
  • SFX command line options.

Notes

  1. It is allowed to edit Windows resources contained in SFX modules to adapt them for your needs. For example, you may wish to resize the start dialog or add some graphics to it. WinRAR does not provide tools or documentation for modifying resources. It is rather complicated process and if you wish to do so, you must already have a resource editor and you must know how to work with it. But you do not need to edit resources if the standard SFX start dialog is acceptable for you. Also if you need to change only SFX bitmap or icon, you can use "Text and icon" page of Advanced SFX options dialog.
  2. By default, exit codes returned by GUI self-extracting archives when terminating are the same as WinRAR exit codes. It is possible to modify this behavior with SetupCode command, so SFX will also return setup program exit codes.


GUI SFX modules: setup commands

WinRAR GUI SFX modules support simple setup commands. You may put them to the SFX archive comment. Setup commands are listed below. Click on the command name for the detailed description.

Delete | Delete a file before extraction
License | Display a program license
Overwrite | Select file overwrite mode
Path | Set the default destination path
Presetup | Run the specified program before extraction
SavePath | Store the destination path
Setup | Run the specified program after successful extraction
SetupCode | Wait for setup program termination and return its exit code
Shortcut | Create a shortcut to unpacked file
Silent | Skip the start dialog
TempMode | Unpack to the temporary folder
Text | Add text to the SFX dialog text window
Title | Set SFX dialog title
Update | Select file update mode

SFX module expands environment variables in command parameters, so it is allowed to use commands like:

Path=%temp%\myapp

Setup=mysetup.exe %sfxpar%

(see Setup for sfxpar variable description).

Here you may look at the simple example of the complete installation script.


GUI SFX modules: command line options

WinRAR GUI SFX modules support several command line options listed below.

Option | Description
-d<path> | Set the destination folder for unpacked files.
-p<pwd> | Specify a password for encrypted SFX archive.
-s, -s1, -s2 | Silent mode. Switch -s is a brief form of -s1. Both -s and -s1 hide SFX dialog and extraction progress. -s1 also hides the license dialog. -s2 hides the start dialog, but extraction progress is displayed.
-sp<par> | If application specified in Setup SFX command does not have any parameters, you can define parameters passed to such application using this switch. If parameters are already present in Setup command, this switch is ignored. Setup application can also read the full SFX command line from sfxcmd environment variable. sfxpar environment variable contains SFX command line parameters only, without leading module name

If you need to insert a quotation mark character into command line parameter, use two consecutive quotation marks to do that.


Console RAR SFX module (WinCon.SFX)

Using this module you can create self-extracting archives, which can be extracted in text mode in Windows command prompt. This module cannot be executed in MS DOS.

WinRAR x64 also includes WinCon64.SFX, which is 64 bit version of this SFX module. By default WinRAR x64 uses 32 bit version, but you can select 64 bit module explicitly in SFX options: Module dialog. Resulting 64 bit SFX archive will work only in Windows x64.

This module supports the following command line switches:

-e Extract from archive (default action)

-t Test archive files

-v Verbosely list contents of archive

-? Show help

Exit codes returned by console self-extracting archives when terminating are the same as WinRAR exit codes.


Frequently asked questions

Questions listed in this FAQ

Q: I still cannot understand how to use WinRAR to extract files.

Q: RAR incorporates a number of different compression "methods", what are the advantages and disadvantages of using them and which one would you recommend for daily use?

Q: I've heard a lot about "Solid" archives. What are they and how can I use them?

Q: How could a user of my site (E-mail system, FTP server etc.) extract files from RAR archives while RAR is shareware and one must register after a 40 day evaluation period?

Q: Where can I get the latest releases of WinRAR?

Q: I received "checksum error" message when extracting. What does it mean?

Q: I failed to extract files from a solid multivolume RAR archive, because one archive volume was damaged. Help me!

Q: I forgot my password, please help me!

Q: Why WinRAR does not delete its temporary files in the Windows temporary folder?

Q: Why WinRAR does not use the maximum dictionary size for my archive?

Questions and answers

Q: I still cannot understand how to use WinRAR to extract files.

A: Please read Shell and command line mode topic. It contains pointers to descriptions of several different ways to extract files.

Q: RAR incorporates a number of different compression "methods", what are the advantages and disadvantages of using them and which one would you recommend for daily use?

A: I tried to answer to this question in the topic How to choose optimal archiving settings.

Q: I've heard a lot about "Solid" archives. What are they and how can I use them?

A: Please see the topic Solid archives.

Q: How could a user of my site (E-mail system, FTP server etc.) extract files from RAR archives while RAR is shareware and one must register after a 40 day evaluation period?

A: The RAR distribution archive contains a free UnRAR utility, UnRAR.EXE, which can be used, without paying a license fee, by anyone wanting to extract archives created by RAR. As an additional BONUS to this, the source code of a portable UnRAR is available on www.rarlab.com. Note that the RAR algorithm is proprietary and you must not use UnRAR sources to reverse engineer it.

Q: Where can I get the latest releases of WinRAR?

A: Visit WinRAR home page www.rarlab.com.

Q: I received "checksum error" message when extracting. What does it mean?

A: The extracted file is corrupt either because of archive damage or problems with hardware. If an archive is damaged, but has a recovery record, you may try to repair it, otherwise it is impossible to restore damaged data. Note that in the case of solid archive all files after a damaged file will be lost.

Q: I failed to extract files from a solid multivolume RAR archive, because one archive volume was damaged. Help me!

A: If you have recovery volumes for your archive, place them to the same folder as your RAR volumes and double click on the first recovery volume (REV file) to start recovery.
If recovery volumes are not available of if they did not help, try to apply Repair command to the damaged volume. Then rename the recovered volume, fixed.arcname.rar (or rebuilt.arcname.rar if recovery record was not found) to the actual volume name and try to unpack your archive again, starting from the first volume.
If you wish to improve chances of your multivolume RAR archives to be successfully repaired in case of data damage, use the recovery record and recovery volumes when creating them and better avoid solid archiving mode, even though non-solid archiving can result in a lower compression ratio.

Q: I forgot my password, please help me!

A: WinRAR encryption does not have any backdoors. Even if we forget a password to any of our archives, we will not be able to restore it. So please do not ask us to help in this situation.

Q: Why WinRAR does not delete its temporary files in the Windows temporary folder?

A: It happens when you use drag and drop to extract files or open archived files with an external viewer. In such case files may still be in use when closing WinRAR and moreover, there is no reliable way to detect if the external program still needs these unpacked files. So WinRAR does not delete them immediately, instead, when you run WinRAR the next time, all temporary files older than one hour will be deleted.
If you do not want to involve the temporary folder when extracting files at all, use either "Extract To" command in WinRAR shell or "Extract To" item in the archive context menu instead of drag and drop.

Q: Why WinRAR does not use the maximum dictionary size for my archive?

A: Even if you specified the maximum dictionary size in the compression settings, WinRAR may automatically decrease this value when creating a new archive if the total archived data size is at least twice less than dictionary size. It does not hurt compression and allows to reduce memory requirements.


Hints

How to install an application from an archive

You may install or run an application directly from an archive. Just enter to an archive and press Enter on setup.exe or install.exe program. When Enter is pressed on an archived file, which has .exe extension WinRAR extracts the entire contents of the archive to a temporary folder and then runs the executable file. When the executable has terminated, WinRAR tests the modification time of the extracted files and if any files were changed or if new files were created, Offers to update the archive and then deletes the temporary folder and its contents.

If you want to use WinRAR to handle archives, but an external program changed archive associations

Some programs may register themselves as the default archive viewer even without asking. If this happens and you want to re-register WinRAR again, select "Settings…" item in Options menu, activate Integration settings dialog, select archive formats to associate with WinRAR and press Enter.

How to install WinRAR in silent mode

If you need to install WinRAR to a large number of computers, it may be boring to answer to setup questions again and again. In such case you may run WinRAR installation with switch -s to skip all questions and use default settings.


END USER LICENSE AGREEMENT

The following agreement regarding RAR (and its Windows version - WinRAR) archiver - referred to as "software" - is made between win.rar GmbH - referred to as "licensor" - and anyone who is installing, accessing or in any other way using the software - referred to as "user".

  1. The author and holder of the copyright of the software is Alexander L. Roshal. The licensor and as such issuer of the license and bearer of the worldwide exclusive usage rights including the rights to reproduce, distribute and make the software available to the public in any form is win.rar GmbH, Marienstr. 12, 10117 Berlin, Germany.

  2. The software is distributed as try before you buy. This means that anyone may use the software during a test period of a maximum of 40 days at no charge. Following this test period, the user must purchase a license to continue using the software.

  3. The software's trial version may be freely distributed, with exceptions noted below, provided the distribution package is not modified in any way.

    1. Nobody may distribute separate parts of the package, with the exception of the UnRAR components, without written permission.

    2. The software's unlicensed trial version may not be distributed inside of any other software package without written permission. The software must remain in the original unmodified installation file for download without any barrier and conditions to the user such as collecting fees for the download or making the download conditional on the user giving his contact data.

    3. The unmodified installation file of WinRAR must be provided pure and unpaired. Any bundling is interdicted. In particular the use of any install or download software which is providing any kind of download bundles is prohibited unless granted by win.rar GmbH in written form.

    4. Hacks/cracks, keys or key generators may not be included, pointed to or referred to by the distributor of the trial version.

    5. In case of violation of the precedent conditions the allowance lapses immediately and automatically.

  4. The trial version of the software can display a registration reminder dialog. Depending on the software version and configuration such dialog can contain either a predefined text and links loaded locally or a web page loaded from the internet. Such web page can contain licensing instructions or other materials according to the licensor's choice, including advertisement. When opening a web page, the software transfers only those parameters which are technically required by HTTP protocol to successfully open a web page in a browser.

  5. The software is distributed "as is". No warranty of any kind is expressed or implied. You use at your own risk. Neither the author, the licensor nor the agents of the licensor will be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.

  6. There are 2 basic types of licenses issued for the software. These are:

    1. A single computer usage license. The user purchases one license to use the software on one computer.

      Home users may use their single computer usage license on all computers and mobile devices (USB drive, external hard drive, etc.) which are property of the license owner.

      Business users require one license per computer or mobile device on which the software is installed.

    2. A multiple usage license. The user purchases a number of usage licenses for use, by the purchaser or the purchaser's employees on the same number of computers.

      In a network (server/client) environment the user must purchase a license copy for each separate client (workstation) on which the software is installed, used or accessed. A separate license copy for each client (workstation) is needed regardless of whether the clients (workstations) will use the software simultaneously or at different times. If for example you wish to have 9 different clients (workstations) in your network with access to RAR, you must purchase 9 license copies.

    A user who purchased a license, is granted a non-exclusive right to use the software on as many computers as defined by the licensing terms above according to the number of licenses purchased, for any legal purpose.

  7. There are no additional license fees, apart from the cost of the license, associated with the creation and distribution of RAR archives, volumes, self-extracting archives or self-extracting volumes. Owners of a license may use their copies of the software to produce archives and self-extracting archives and to distribute those archives free of any additional royalties.

  8. The licensed software may not be rented or leased but may be permanently transferred, in its entirety, if the recipient agrees to the terms of this license.

  9. To buy a license, please read the file order.htm provided with the software for details.

  10. You may not use, copy, emulate, clone, rent, lease, sell, modify, decompile, disassemble, otherwise reverse engineer, or transfer the licensed software, or any subset of the licensed software, except as provided for in this agreement. Any such unauthorized use shall result in immediate and automatic termination of this license and may result in criminal and/or civil prosecution.

    Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR binary code may be used or reverse engineered to re-create the RAR compression algorithm, which is proprietary, without written permission.

    The software may be using components developed and/or copyrighted by third parties. Please read "Acknowledgments" help file topic for WinRAR or acknow.txt text file for other RAR versions for details.

  11. This License Agreement is construed solely and exclusively under German law. If you are a merchant, the courts at the registered office of win.rar GmbH in Berlin/Germany shall have exclusive jurisdiction for any and all disputes arising in connection with this License Agreement or its validity.

  12. Installing and using the software signifies acceptance of these terms and conditions of the license. If you do not agree with the terms of this license, you must remove all software files from your storage devices and cease to use the software.


Purchasing information

You purchase WinRAR license because, as registered user, you

  1. Encourage us to further develop and improve WinRAR, making possible new WinRAR releases;
  2. May use WinRAR in commercial and other environments;
  3. Access support and assistance, via email and WinRAR support sites, worldwide.

What you need to buy

If you wish to become a registered WinRAR user, all you need to do is make a payment to the author, via one of the regional dealer sites listed here. Many dealers will accept credit cards, all will accept cash or cashier's cheque.

Please see the file order.htm in the WinRAR distributive for details.

You may visit WinRAR home page for buying online or to read the latest sites list.

Purchasing procedure

Upon receipt of your fee with the completed registration form you will receive a registration key file which will correspond to the registration string given in the registration form.

Upon receipt of your registration key file you should put it to WinRAR folder or to %APPDATA%\WinRAR folder. If the key is archived, in a .RAR file, please extract the key from the archive in order to register your copy of WinRAR.

It is possible, depending upon the facilities available at your local registration site, to have the key delivered to you by e-mail or by your local postal service on diskette.


Add shortcut

Here you may enter parameters a new shortcut, which will be created by SFX archive after unpacking. This dialog contains following fields:

Where to create

Choose where you wish to create a shortcut.

Source file name

Name of archived file.

Destination folder

Folder to place the shortcut in. If it is not exist, it will be created by SFX archive.

Shortcut description

Text describing a created shortcut.

Shortcut name

Name of .lnk (shortcut) file created by SFX.

Shortcut icon

Name of icon file associated with shortcut. If you leave it blank, the default icon will be used. If icon file name does not contain the full path, SFX archive will search the icon file in folder containing unpacked files.

Only "Where to create" and "Source file name" are required, all other parameters are optional.


%APPDATA%\WinRAR folder

Old WinRAR versions stored supplementary files like a registration key, exported settings file settings.reg, themes or log file in the same folder as WinRAR executable. In Windows Vista and following Windows versions it is not recommended to store such data in the program folder. Software may even fail when trying to do it. Recommended locations for application data are subfolders of so called %APPDATA% folder.

Real path to %APPDATA% depends on Windows version. To open %APPDATA% folder do the following: run Windows Explorer or open "My Computer" window, type %APPDATA% in address bar and then press Enter. WinRAR stores its files in "WinRAR" subfolder of %APPDATA%. You may enter %APPDATA%\WinRAR in Windows Explorer address bar to go directly to WinRAR data folder.

Situations when you need to access %APPDATA%\WinRAR manually are rare. Samples of such situations may include copying settings.reg to another computer or browsing the error log file with some external viewer.

Note that WinRAR tries to search the registration key and settings.reg file both in %APPDATA%\WinRAR and in WinRAR program folder, with %APPDATA%\WinRAR having precedence.

If you need to override the location of %APPDATA%\WinRAR, you can set the string value "AppData" in Registry key HKEY_CURRENT_USER\Software\WinRAR\Paths containing a new path to WinRAR supplementary files.


Archive types

  • RAR versus ZIP
  • RAR 5.0 archive format
  • Support of other archive formats
  • Solid archives
  • Self-extracting archives (SFX)
  • Split archives (multi-volume)
  • Recovery volumes
  • Encryption
  • Archive comment
  • Protecting archives from damage
  • Locking archives
  • How to choose optimal archiving settings


Archiving with password

In this dialog you may enter a password, which will apply to the archive, which you are going to create now. The entered password will be active during only one current archiving operation. If you need a global password instead, you may enter it using "Set default password" command in File menu.

If "Show password" option is disabled, you will be asked to type the password twice to ensure correctness.

If you set "Encrypt file names" option, WinRAR will encrypt not only file data, but all other sensitive archive areas like file names, sizes, attributes, comments and other blocks, so it provides a higher security level. Without a password it is impossible to view even the list of files in archive encrypted with this option. This option is available only when compressing data to RAR archive, it is not supported for ZIP format.

If you already saved some passwords, you can access them either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature. Press "Organize passwords..." button to open "Organize passwords" dialog, where you can save frequently used passwords.


"Command parameters" dialog

This dialog allows to switch the state of "Turn PC off when done" option on the fly, without interrupting archiving, extraction or test operations.

For archiving operations it is also possible to change the compression method here, but WinRAR cannot switch to and from "Store" mode in this dialog.


Advanced compression parameters

Usually there is no need to change settings in this dialog and it is safer to allow WinRAR to select optimal parameters automatically. Please note that improper use of this dialog may lead to very serious performance and compression loss, so change its parameters only if you clearly understand what you do.

Most of settings below are supported only by RAR 4.x archive format. None of these settings are available for ZIP. Only delta compression and 32 bit executable compression can be enabled for RAR 5.0 archives.

This dialog contains the following options.

Text compression/(Auto/Force/Disable)

Text compression allows to improve the compression ratio for plain text data, but its compression and decompression speed also as ability to utilize several processor cores are much worse than in general compression algorithm. So the default state for this option is "Disable". You can change it to "Auto" to allow WinRAR to select this algorithm automatically for suitable data. "Force" applies the text compression algorithm to all data, but be prepared to slower archiving and extracting if using this option.

Text compression/Prediction order

Set the prediction order of PPM algorithm (the kernel of RAR text compression). Allowed values are 2 - 63. Usually a higher value slightly increases the compression ratio of redundant data, but only if enough memory is available to PPM. In case of lack of memory the result may be negative. Higher order values decrease both compression and decompression speed. If this field is set to 0, WinRAR will choose the order automatically.

Text compression/Memory to use, MB

Memory in megabytes allocated for PPM (can be 1-128). Higher values may increase the compression ratio, but note that PPM uses an equal memory size both to compress and decompress, so if you allocate too much memory when creating an archive, other people may have problems when unpacking it on a computer with less memory installed. If this field is set to 0, WinRAR will choose the memory size automatically.

Audio compression/(Auto/Force/Disable)

In "Auto" mode WinRAR will decide when to use the audio compression depending on source data and only if "Normal", "Good" or "Best" compression method is selected. "Force" applies the audio compression algorithm to all compressing data. It makes sense only if you are sure that all compressed files completely consist of raw audio data. "Disable" prohibits the audio compression algorithm at all.

The audio compression is designed to process raw audio data like WAV files. It does not increase compression of already compressed audio files like MP3.

Audio compression/Channels

Number of byte channels (can be 1 - 31).

WinRAR splits multibyte channels to bytes, for example, two 16-bit audio channels are considered by WinRAR as four channels one byte each. If this field is set to 0, WinRAR will detect a number of channels automatically.

True color compression/(Auto/Force/Disable)

In "Auto" mode WinRAR will decide when to use the true color compression depending on source data and only if "Normal", "Good" or "Best" compression method is selected. "Force" applies the true color compression algorithm to all compressing data. It makes sense only if you are sure that all compressed files completely consist of true color (RGB) data. "Disable" prohibits the true color compression algorithm at all.

The true color compression is designed to process raw RGB based color data like 24-bit BMP files. It does not increase compression of already compressed files like JPG.

Enable 32-bit executable (Pentium) compression

Allow WinRAR to improve compression of 32-bit Intel executable files using an algorithm specially optimized for this data type.

Enable 64-bit executable (Itanium) compression

Allow WinRAR to improve compression of 64-bit Intel executable files using an algorithm specially optimized for this data type.

Enable delta compression

Allow WinRAR to improve compression of structured table data using an algorithm specially optimized for this data type.

Default button

Reset all options of this dialog to default values.


Context menu items

"Choose items to display in Explorer context menus" options group lets you to select items to add to Explorer context menus. These items are displayed when you click on a file or archive icon in Explorer or Desktop by the right mouse button.

"Where to check for SFX archives" options control processing of SFX archives in context menus. Checking contents of executable file and detecting if it is a self-extracting (SFX) archive introduces some delay when right clicking every ".exe" file, because WinRAR needs to read and analyze file data to find out if it is SFX. While such delay is negligible for fast local hard drives, it can be noticeable in case of slow network disks. This group of options allows to enable or disable SFX processing for local hard disks, network disks and other disks like CD-ROM and USB separately. If you turn these options off, you will not see all SFX related context menu items when right clicking SFX archive. So disable these options only if you really experience delays when right clicking ".exe" files.


"Define volume sizes" dialog

This dialog allows to customize the list of predefined volume sizes associated with "Split to volumes, size" field in Archive name and parameters dialog.

Use "Predefined sizes" options to select disk sizes to display in the list. If you need a value missing in "Predefined sizes", you can specify up to four additional list entries in "User defined sizes". Just enter a label and size for your entry. Label is any short text string and size is a numeric value in bytes. You can omit the label if you wish.

""Autodetect" string" option in "Other items" controls presence of "Autodetect" item in the list. If you never use autodetecting of volume size when compressing to removable media, you can turn this option off to make the list shorter.

"History entries" option defines the number of items previously entered by user and displayed at the top of list. You can set it to zero if you do not need to keep the history of manually entered volume sizes at all. Maximum value of this parameter can be 9.


Enter default password

In this dialog you may enter a default password, which will apply to the add, extract, test and view operations.

If "Show password" option is disabled and password is requested for archiving operation, you will be asked to type the password twice to ensure correctness.

If you set "Encrypt file names" option, WinRAR will encrypt not only file data, but all other sensitive archive areas like file names, sizes, attributes, comments and other blocks, so it provides a higher security level. Without a password it is impossible to view even the list of files in archive encrypted with this option. This option makes sense only when compressing data to RAR archive, it is ignored when the default password is used to decompress data or to compress to ZIP.

If you enabled "Use for all archives" option and entered the empty string as a password, extract and test commands will skip all encrypted archives. All attempts to open encrypted files and archives will also be blocked until this option is turned off. This mode can be convenient if you are going to unpack a group of archives in unattended mode and want to avoid password prompts. "Use for all archives" is not available for non-empty passwords, because non-empty default passwords are applied to all archives automatically, without any additional options.

If you already saved some passwords, you can access them either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature. Press "Organize passwords..." button to open "Organize passwords" dialog, where you can save frequently used passwords.


Executing archive operation

An archive operation is being executed. Wait until it is finished or press the "Cancel" button to break it immediately. While archiving or extracting you may also press the "Background" and "Pause" buttons. "Background" minimizes WinRAR into the tray. It will be restored automatically after finishing the current operation or you may click on the small WinRAR icon in the tray to restore it. "Pause" button pauses the current operation, you need to press "Continue" to resume it.

Both when archiving and when extracting, the progress bar at the top of the command window shows processing of the current file.

During archiving and some of extraction operations an additional progress bar indicating the total operation progress is displayed at the bottom of the command window. Its look depends on "Windows progress bar" option in General settings dialog. If this option is off and WinRAR is archiving files, the total operation progress bar will use 3 colors. Compressed data is painted in yellow and read data in light gray, so comparing yellow to gray you can estimate the compression ratio. If "Windows progress bars" is on, only two colors are used, but in either case the compression ratio is also displayed in the separate line of this window.

During archiving, extraction and test operations you can use "Mode…" button to switch the state of "Turn PC off when done" option on the fly. For archiving operations you can also change the compression method here, but WinRAR cannot switch to and from "Store" mode in this dialog.


Extraction path and options dialog: advanced options

You may specify the following options in this dialog:

File time

Set modification/creation/last access time

Windows file systems keep three different time fields for each file: last modification, creation and last access. By default WinRAR stores only last modification time, but using file time options in Time part of archiving dialog you may enable storing of creation and last access time. Even if a desired time field is present in archive, it is also necessary to set the corresponding time option in the extraction dialog to restore it on extraction. All these options are supported only by RAR and ZIP archives, for other formats WinRAR always restores only the modification time.

Attributes

Clear attribute "Archive"

Clear attribute "Archive" on the extracted files. This option is designed for backup purposes.

Set file security

This option has meaning only for NTFS file system and allows to restore file owner, group, access control and audit information if it was previously saved in the archive. It is necessary to specify "Save file security data" option in Advanced part of archiving dialog to preserve security information when creating an archive. You need to have necessary privileges in order to use this facility. Processing of security data may decrease the speed of archiving operation, so set this option only if you understand its meaning and really need it, in most cases security processing is not required for home users.

This feature is supported only by RAR archives.

Set attribute "Compressed"

This option allows to restore NTFS "Compressed" attribute when extracting files. WinRAR saves "Compressed" file attributes when creating an archive, but does not restore them unless this option is specified.

This feature is supported only by RAR archives.

File paths

Extract relative paths

This mode is used by default. If you browse some archive subfolder in WinRAR shell, the path part up to and including the current subfolder will be removed from extracted file paths. For example, if you are inside of "Backup\MyData" archive folder and extract "Images" folder, it will be extracted as "Images", not as "Backup\MyData\Images".

If you browse the root archive folder or start extraction from context menu, this mode works exactly as Extract full paths option.

Extract full paths

WinRAR unpacks contents of archive including the path information into the destination folder. Unlike Extract relative paths mode, the path information is unpacked completely, regardless of current archive folder.

Do not extract pathnames

If the option is set, selected files from the root archive folder and from selected subfolders will be extracted into the destination folder. The path information is ignored.

Extract absolute paths

If archive was created using "Store full paths including the drive letter" mode selected in Files part of archiving dialog and you set "Extract absolute paths" option, WinRAR will create unpacked files in their original folders and disks. Be careful, do not set this option unless you are completely sure that archive does not contain malicious files. You may read more about potential benefits and dangers of "Extract absolute paths" mode in the description of -ep3 switch, which is the command line equivalent of this WinRAR option. This feature is supported only by RAR and ZIP archives.

Delete archive

Never

Do not delete an unpacked archive.

Ask for confirmation

Ask for user confirmation before deleting an unpacked archive.

Always

Delete an unpacked archive without a confirmation.

WinRAR deletes an archive only if it had been unpacked without errors and if all archived files were selected to unpack. If you unpack a multivolume archive, all its volumes will be deleted.

Note that you can save the default state of this option with "Save settings" button in General page of extraction dialog and it will also affect command line and context menu extraction commands. Use "Ask for confirmation" and especially "Always" mode with care. Deleting an unpacked archive can cause data loss if used improperly.

Miscellaneous

Background extraction

Minimize WinRAR to tray when starting the extraction process.

Wait if other WinRAR copies are active

Wait in the queue if other WinRAR copies are creating, modifying or unpacking an archive and start the operation only when other WinRAR tasks are complete. If you are going to perform several archiving or decompressing tasks, such sequential execution can help to reduce amount of disk seeks and improve overall performance.

You can override this option for current operation by pressing "Continue" button in operation progress window. When you press "Continue", WinRAR stops waiting regardless of other copies activity.


Extraction path and options dialog: general options

This part of extraction dialog enables to select the destination folder for extracted files and set some general options. By default the destination folder is the same as the archive name and is placed in the current folder, but you may change the default value using Compression settings. You can enter the new path (which will be created if does not already exist) in "Destination path" field or select an existing folder from the folders tree pane.

The dialog attempts to choose an entering folder name in the tree automatically as you type, but only after a small delay (about 0.5s) and if the entered path contains a drive letter. If folder does not exist, either its parent or another folder most similar to the entered one will be selected. Also you may force the dialog to immediately search for the entered folder name pressing Display button, what may be useful to locate a folder which was not entered by user, but proposed as the default when opening the dialog.

You can create a new folder using New folder button. It will be created in a folder selected in tree pane or specified in "Destination path" field, depending on what you changed last. Use F2 key to rename folders in tree pane, Del to remove them and F5 to refresh the tree contents.

Extraction dialog is resizable. You can use the mouse to drag its border to the desired size to provide more space for folder list pane. WinRAR will store new dimensions of this dialog.

Additionally to destination path, the general part of extraction dialog provides the following options:

Update mode

Extract and replace files (default)

Extract all selected files.

Extract and update files

Extract those selected files, which copies either not present in the target folder or older than extracting files.

Freshen existing files only

Extract only those selected files, which exist in the target folder and older than the corresponding file in the archive. If a file not present on disk, it will be skipped.

Overwrite mode

Ask before overwrite (default)

Prompts before overwriting a file.

Overwrite without prompt

Files are overwritten without any prompt.

Skip existing files

Do not overwrite files which are already exist.

Rename automatically

Rename extracted files automatically if file with the same name already exists. Renamed file will get the name like 'filename(N).txt', where 'filename.txt' is the original file name and 'N' is a number.

Miscellaneous

Extract archives to subfolders

This option is available only when more than one archive is unpacked. It will place unpacked contents of each archive to separate subfolder, which name will be generated basing on the archive name.

Keep broken files

WinRAR will not delete files which are not extracted properly, for example, when the archive is damaged (by default, WinRAR deletes such files). You can try to save part of the information from a broken file.

Display files in Explorer

After the extraction is finished, WinRAR will open Explorer window displaying contents of destination folder.

Save settings

Press "Save settings" button if you wish to save the current state of both parts (General and Advanced) of extraction dialog. Saved state will be restored as the default when activating the dialog next time. WinRAR saves all options except the destination path. If you need to specify the default destination folder, use Compression settings dialog.


Enter password for extracted file

You are trying to extract an encrypted file or view contents of encrypted archive. Enter the password or cancel the extraction.

If you unpack several archives at once, you can enable "Use for all archives" option to apply the entered password to all archives. This option is not available if only one archive is processed. Another possible application for this option is skipping encrypted archives. Just enter an empty string as a password and set "Use for all archives" on.

If you already saved some passwords, you can access them either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature. Press "Organize passwords..." button to open "Organize passwords" dialog, where you can save frequently used passwords.


Archive name and parameters dialog: advanced options

Save file security data

This option has meaning only for NTFS file system and allows to save file owner, group, access control and audit information. You need to have necessary privileges in order to use this facility. Processing of security data may decrease the speed of archiving operation, so set this option only if you understand its meaning and really need it, in most cases security processing is not required for home users.

This option is supported only for RAR archives.

Save file streams

This option has meaning only for NTFS file system and allows to save alternative data streams associated with a file. You may need to set it if you use software storing data in alternative streams. Streams are not saved for NTFS encrypted files.

This option is supported only for RAR archives.

Store symbolic links as links

Store NTFS symbolic links and reparse points as links, so file contents is not archived. Such archive entries are restored as symbolic links or reparse points when extracting. You may need to run WinRAR as administrator to create symbolic links when extracting. Supported for RAR 5.0 archives only.

Store hard links as links

If archiving files include several NTFS hard links, store the first archived hard link as usual file and the rest of hard links in the same set as links to this first file. When extracting such files, WinRAR will create hard links instead of usual files.

You must not delete or rename the first hard link in archive after the archive was created, because it will make extraction of following links impossible. If you modify the first link, following links will also have the modified contents after extracting. Extraction command must involve the first hard link to create following hard links successfully. Supported for RAR 5.0 archives only.

Pause after each volume

By default WinRAR asks for confirmation before creating or unpacking next volume only for removable disks. This option forces WinRAR to ask such confirmation always. It can be useful if disk space is limited and you wish to copy each volume to another media immediately after creation.

This option is supported only for RAR volumes.

Old style volume names

By default RAR volumes have names like 'volname.partNNN.rar', where NNN is the volume number. For RAR 4.x archive format using this option it is possible to select another, extension based naming scheme, where the first volume file in a multi-volume set has the extension .rar, following volumes are numbered from .r00 to .r99. RAR 5.0 archives do not support this option and extension based names.

Recovery volumes

This option is available only when you create RAR multivolume archive, in this case you just need to select the number of recovery volumes to create. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes. Each recovery volume allows to reconstruct one missing volume file. You may read more about this feature here.

Background archiving

Minimize WinRAR to tray when starting the archiving process.

Turn PC off when done

Turn PC off after completing an operation. The hardware must support the power off feature.

Wait if other WinRAR copies are active

Wait in the queue if other WinRAR copies are creating, modifying or unpacking an archive and start the operation only when other WinRAR tasks are complete. If you are going to perform several archiving or decompressing tasks, such sequential execution can help to reduce the amount of disk seeks and improve overall performance.

You can override this option for current operation by pressing "Continue" button in operation progress window. When you press "Continue", WinRAR stops waiting regardless of other copies activity.

Recovery record

Specify recovery record size as a percent of total archive size. Larger recovery record allows to recover from more serious damage, but it also increases the archive size and processing time, so 3 - 10% is probably optimal. This input field is available only if you enabled "Add recovery record" option on General page of this dialog.

Compression…

Opens Advanced compression parameters dialog, where you may configure different modules of WinRAR compression algorithm. Improper settings in this dialog may seriously hurt archiver performance, so use it carefully.

SFX options

Selects a self-extracting module and sets a number of optional SFX parameters like a destination folder or window title. Note that SFX parameters are applicable only to Windows GUI module and are not supported by console or non-Windows SFX. The "SFX options" button is available only if you enabled "Create SFX archive" option in the General options of this dialog.

It is possible to store selected SFX options in a compression profile, WinRAR puts commands describing SFX parameters to the archive comment.


Archive name and parameters dialog: backup options

Erase destination disk contents before archiving

All files and folders on the target disk will be erased before starting the archiving operation. If you create volumes, erasing will be performed before creating of each volume, giving you the chance to archive to non-empty removable disks. But you must be sure that disks do not contain any useful information. The option applies only to removable media, hard disk cannot be erased using this function.

Add only files with attribute "Archive" set

Only those files which have attribute "Archive" set, will be added. This option is designed for backup purposes.

Clear attribute "Archive" after compressing

Clear attribute "Archive" on successfully compressed files. This option is designed for backup purposes.

Open shared files

Allows to process files opened by other applications for writing. It helps if an application allowed read access to file, but if all types of file access are prohibited, file open operation still will fail.

This option could be dangerous, because it allows a file to be archived, while that file may be in the process of being modified by an other application. Use with great care.

Generate archive name by mask

Appends the current date string to an archive name when creating an archive. Useful for daily backups. The date string is formatted by the specified mask. Read description of switch -ag for details.

Keep previous file versions

Forces WinRAR to keep previous file versions when updating files in the already existing archive. Old versions are renamed to 'filename;n', where 'n' is the version number. Supported only by RAR archives.


Archive name and parameters dialog: comment

Here you may specify an archive comment to add to a new or updated archive. You may either enter a name of a file containing comment text in the "Load comment from the file" field or enter a comment manually in the "Enter comment manually " window.


Archive name and parameters dialog: files

Files to add

Names of files and folders to compress. This field is automatically filled by selected file names, but, if necessary, you may edit them manually or press "Append" button to choose more files to add to the list.

It is allowed to enter wildcard masks here. In this case WinRAR will search for files matching a mask in the current folder and all subfolders. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

*.txt *.doc "set 1.*"

to archive all .txt and .doc files.

Files to exclude

File masks and file names to exclude from the archiving operation. Wildcards are supported both in path and name parts of masks. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

c:\temp\info.txt *.bak *.tmp *\temp\

to skip c:\temp\info.txt file, all .bak and .tmp files, all temp folders and all files in temp folders. You may enter file names manually or use "Append" button to browse for file to exclude.

Detailed information about exclusion masks syntax is provided in description of switch -x. This switch uses the same format of exclusion masks as "Files to exclude" field.

Files to store without compression

File masks and file names to store without compression. This option may be used to store already compressed files, which helps to increase archiving speed without noticeable loss in the compression ratio. If you need to specify several masks, separate them by spaces. If mask contains spaces, enclose it in quotes. For example, you may enter:

*.rar *.zip *.jpg

to store without compression all RAR and ZIP archives and JPG images.

File paths

Select the method of storing file paths in archive. WinRAR may store paths relative to the current folder (default), full file paths except the drive letter and leading backslash character, store only file names without paths or store full paths including the drive letter.

If you store names without paths, it is possible to create an archive containing several files with the same name, so use "Do not store paths" option with care.

If you store full paths including the drive letter, WinRAR will replace drive separators (colons) by underscore characters. WinRAR is able to change underscores back to colons and create unpacked files in their original folders and disks, if you set "Extract absolute paths" option in "Advanced" part of extraction dialog. You may read more about potential benefits and dangers of "Store full paths including the drive letter" mode in the description of -ep3 switch, which is the command line equivalent of this WinRAR option.

Put each file to separate archive

Put each selected file or folder to separate archive. If you set this option, an entered archive name is treated only as a destination path for new archives (if it is not a folder, its name part is ignored) and archive names are generated basing on file names.

Send archive by email to [<addr>] [and then delete]

This option allows to attach a created archive to email message. You need to have an installed MAPI compliant email program to use this option (most modern email programs support MAPI interface). If you do not enter a destination email address here, it will be asked by your email program. It is possible to specify several addresses separated by commas or semicolons. If you set "and then delete" option, an archive will be deleted after it was successfully attached to an email.

If Send archive by email option is used when creating a multivolume archive, every volume will be attached to a separate email message.


Archive name and parameters dialog: general options

The dialog contains the following items:

Destination archive name

Enter the name manually or press the "Browse" button to browse for the archive name. You may enter a name containing a disk letter or the full path to the archive.

Profiles

Opens the menu allowing to create new, organize and select compression profiles. Compression profiles allow you to quickly restore previously saved compression options or to specify default options for this dialog. WinRAR provides a few predefined profiles optimized for creating e-mail attachments, backup files and other operations. Please see the topic Compression profiles for more information.

Archive format (RAR, RAR5, ZIP)

Select format of newly created archive. You can specify RAR to use RAR 4.x compatible format, RAR5 for latest RAR 5.0 format or ZIP to create ZIP archive. Depending on archive format selected, some advanced options not supported by target format will be disabled. If you update an existing archive, this option is ignored and WinRAR uses the format of updating archive.

Compression method

Choose between "Store", "Fastest", "Fast", "Normal", "Good" and "Best" methods. "Store" writes files to archive at maximum speed and without compression. All following methods compress data, providing a higher compression ratio and lower speed when going from "Fastest" to "Best".

Dictionary size

This is a size of memory area used to find and compress repeated patterns in processing data. Larger compression dictionary sometimes allows to improve the compression ratio of big files, especially when creating a solid archive. But larger dictionary also decreases the compression speed and increases memory requirements. Compression needs about 6 times more memory than dictionary size. Decompression takes slightly more memory than just 1 dictionary size. If you expect your RAR 5.0 archive to be decompressed on all kinds of computers, including those with small memory, better avoid maximum dictionary sizes and select something in the middle, like 32 or 64 MB.

Maximum dictionary size for RAR 4.x archives is 4 MB. RAR 5.0 format allows to create archives with up to 1 GB dictionary in 64 bit WinRAR version and up to 256 MB in 32 bit WinRAR (up to 128 MB in Windows XP x86). Decompression needs less memory than compression, so both 32 and 64 bit WinRAR can decompress archives with all dictionary sizes including 1 GB provided that computer has more than 1 GB of available memory. ZIP format dictionary size is fixed to 32 KB.

Volume size in "Split to volumes, size" field

If you wish to create volumes, enter a size of single volume here. You can choose size units in the drop down list to the right of size field. In this list "B" means bytes, "KB" - kilobytes, "MB" - megabytes and "GB" - gigabytes.

It is allowed to enter decimal fractions using the decimal symbol defined in Windows regional settings.

Also it is possible to select units by appending one or two characters to volume size string. Lowercase 'k' means kilobytes, uppercase 'K' - thousands of bytes, 'm' - megabytes, 'M' - millions of bytes, 'g' - gigabytes, 'G' - billions (milliards) of bytes. "KB", "MB" and "GB" always mean kilobytes, megabytes and gigabytes regardless of character case.

Volume size input field has the associated drop down list containing previously entered, predefined and defined by user values. You can use this list to quickly select any of items it contains. This list can be customized with Define volume sizes dialog. To activate it press "Define volume sizes…" button in Compression settings dialog.

If you are archiving to removable disks and using RAR format, you may select "Autodetect" from the list and WinRAR will choose the volume size automatically for each new volume.

Update mode

  • Add and replace files (default). Always replace archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Add and update files. Replace archived files only if added files are newer. Always add those files, which are not present in the archive.
  • Freshen existing files only. Replace archived files only if added files are newer. Do not add those files, which are not present in the archive.
  • Ask before overwrite. Ask for confirmation to overwrite archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Skip existing files. Do not replace archived files, which have same name as files to be added. Always add those files, which are not present in the archive.
  • Synchronize archive contents. Replace archived files only if added files are newer. Always add those files, which are not present in the archive. Delete those archived files, which are not present in the added files. It looks similar to creating a new archive, but with the one important exception: if no files are modified since a last backup, the operation is performed much faster than the creation of a new archive.

Delete files after archiving

Remove successfully archived source files.

Create SFX archive

Creates a self-extracting archive (exe file), which can be unpacked without using any other programs. You may select the type of SFX module and set a few other SFX parameters like a destination folder in the Advanced options of this dialog.

Create solid archive

Creates a solid archive. Usually gives higher compression ratios, but applies some restrictions. Read the description of solid archives for more details.

Add recovery record

Adds the recovery record, which may help to restore an archive in case of damage. You can specify the recovery record size in Advanced options of this dialog. Default value is 3% of total archive size.

Test archived files

Test files after archiving. This option is especially useful if "Delete files after archiving" is also enabled. In this case files will be deleted only if the archive had been successfully tested.

Lock archive

A locked archive cannot be modified by WinRAR. You may lock important archives to prevent accidental modification.

Set password

Set a password to encrypt archived files. It is valid only during a single archiving operation and overrides the default password entered in File menu. If the default password is present, it will be restored after the archiving operation is completed. If the default password was absent before starting archiving, it also will be absent after finishing the operation.


Archive name and parameters dialog

This dialog is displayed when executing Add to archive command before adding files to an archive.

Options contained in this dialog are divided into a few separate groups. Select any of the items below for a detailed description of the group:

  • General
  • Advanced
  • Options
  • Files
  • Backup
  • Time
  • Comment


Archive name and parameters dialog: options

Delete mode

All delete options listed below modify the behavior of "Delete files after archiving" from General options. They have an effect only if "Delete files after archiving" is on. You can enable any of these options in the default compression profile to change the default behavior of "Delete files after archiving".

Delete files

Delete files normally. Files are deleted permanently, but not securely, so sometimes it may be possible to recover them using special software.

Move files to Recycle Bin

Deleted files are placed to Recycle Bin.

Wipe files

Before deleting file data are overwritten by zero bytes to prevent recovery of deleted files.

Please be aware that such approach is designed for usual hard disks, but may fail to overwrite the original file data on solid state disks, as result of SSD wear leveling technology and more complicated data addressing.

Wipe files if password is set

If this option is on and files are archived with a password, "Wipe files" mode is enabled regardless of other options in "Delete mode" group.

There is no much sense to enable it directly in archiving dialog, because you can just turn on "Wipe files" instead. So this option is intended for use in compression profiles. If you prefer to always delete encrypted files securely, you can enable "Wipe files if password is set" in the default compression profile.

Archive features

Use BLAKE2 file checksum

Store BLAKE2 file checksums. Available only for RAR 5.0 archive format.

File data integrity in RAR archive is protected by checksums calculated and stored for every archived file. By default, WinRAR uses CRC32 function to calculate the checksum. RAR 5.0 archive format also allows to select BLAKE2sp version of BLAKE2 hash function instead of CRC32.

CRC32 output is 32 bit length. While CRC32 properties are suitable to detect most of unintentional data errors, it is not reliable enough to verify file data identity. In other words, if two files have the same CRC32, it does not guarantee that file contents is the same.

BLAKE2 output is 256 bit. Being a cryptographically strong hash function, it practically guarantees that if two files have the same value of BLAKE2, their contents is the same. BLAKE2 error detection property is also more reliable than in shorter CRC32.

Since BLAKE2 output is longer, resulting archive is slightly larger, when this option is enabled.

If archive headers are unencrypted (Encrypt file names option was not set), checksums for encrypted RAR 5.0 files are modified using a special password dependent algorithm, to make impossible guessing file contents based on checksums. Do not expect encrypted file checksums to match usual CRC32 and BLAKE2 values.

Save identical files as references

If this option is enabled, WinRAR analyzes the file contents before starting archiving. If several identical files larger than 64 KB are found, the first file in the set is saved as usual file and all following files are saved as references to this first file. It allows to reduce the archive size, but applies some restrictions to resulting archive. You must not delete or rename the first identical file in archive after the archive was created, because it will make extraction of following files using it as a reference impossible. If you modify the first file, following files will also have the modified contents after extracting. Extraction command must involve the first file to create following files successfully.

It is recommended to use this option only if you compress a lot of identical files, will not modify an archive later and will extract an archive entirely, without necessity to unpack or skip individual files. If all identical files are small enough to fit into compression dictionary, solid archiving can provide more flexible solution than this option.

Supported for RAR 5.0 archives only.

Quick open information

RAR archives store every file header containing information such as file name, time, size and attributes immediately before data of described file. This approach is more damage resistant than storing all file headers in a single continuous block, which if broken or truncated would destroy the entire archive contents. But while being more reliable, such file headers scattered around the entire archive are slower to access if we need to quickly open the archive contents in a shell like WinRAR graphical interface.

To improve archive open speed and still not make the entire archive dependent on a single damaged block, RAR 5.0 archives can include an optional quick open record. Such record is added to the end of archive and contains copies of file names and other file information stored in a single continuous block additionaly to normal file headers inside of archive. Since the block is continuous, its contents can be read quickly, without necessity to perform a lot of disk seek operations. Every file header in this block is protected with a checksum. If WinRAR detects that quick open information is damaged, it resorts to reading individual headers from inside of archive, so damage resistance is not lessened.

Quick open record contains the full copy of file header, which may be several tens or hundreds of bytes per file, increasing the archive size by the same amount. This size increase is most noticeable for many small files, when file data size is comparable to file header. So by default, in "Add for larger files" mode, WinRAR stores copies of headers only for relatively large files and continues to use local headers for smaller files. Concrete file size threshold can depend on WinRAR version. Such approach provides a reasonable open speed to archive size tradeoff. If you prefer to have the maximum archive open speed regardless of size, you can use "Add for all files" to store copies of all file headers. If you need to have the smallest possible archive and do not care about archive open speed in different programs, set "Do not add" to exclude the quick open information completely.

If you wish to measure the performance effect of this option, be sure that archive contents is not stored in a disk cache. No real disk seeks are performed for cached archive file, making access to file headers fast even without quick open record.


Archive name and parameters dialog: time options

High precision modification time

If this option is disabled, file modification time is stored with two seconds precision. It is enough for FAT file system, but insufficient for NTFS. Enabling this option may slightly increase the archive size, but it allows WinRAR to preserve the file time with 0.0000001 second precision.

In ZIP archives the high precision modification time is stored in the same data structure as creation and last access times. So if you enable this option when archiving to ZIP, WinRAR will write all three times to resulting archive. You will still be able to choose times to set in "Advanced" part of extraction dialog. RAR format stores file times individually.

"Store creation time" and "Store last access time"

Windows file systems keep three different time fields for each file: last modification, creation and last access. By default WinRAR stores only last modification time, but using these options you may enable storing of creation and last access time. It may be useful for backups. Supported only by RAR archives. ZIP archives always preserves these file times if "High precision modification time" option is enabled.

Note that you need to enable "Set creation time" and "Set last access time" options in the "Advanced" part of extraction dialog to restore these times when extracting files.

Include files: of any time / older than / newer than / modified before / modified after

The default value of this option is "any time", so WinRAR will archive all selected files regardless of their time stamp. But changing it to "older than" or "newer than" you may force WinRAR to archive only those files which modification time is older or newer than a specified number of days, hours and minutes. For example, it can be useful if you wish to archive only files modified in last 3 days. Using "modified before" or "modified after" you may choose only those files which modification time is older or newer than concrete specified date.

Set archive time to: current system time / original archive time / latest file time

Default value for this option is the "current system time", so every new or modified archive receives the current system time as modification file time. But you also may set this option to the "original archive time" to prevent the archive time from changing or to the "latest file time" to set the modification time of a changed archive to the time of newest file in the archive.


Brian Gladman's AES implementation

WinRAR encryption and decryption routines use parts of code from Brian Gladman's AES implementation, which is licensed under the following conditions:

 ---------------------------------------------------------------------------
 Copyright (c) 2002, Dr Brian Gladman <                 >, Worcester, UK.
 All rights reserved.

 LICENSE TERMS

 The free distribution and use of this software in both source and binary
 form is allowed (with or without changes) provided that:

   1. distributions of this source code include the above copyright
      notice, this list of conditions and the following disclaimer;

   2. distributions in binary form include the above copyright
      notice, this list of conditions and the following disclaimer
      in the documentation and/or other associated materials;

   3. the copyright holder's name is not used to endorse products
      built using this software without specific written permission.

 ALTERNATIVELY, provided that this notice is retained in full, this product
 may be distributed under the terms of the GNU General Public License (GPL),
 in which case the provisions of the GPL apply INSTEAD OF those given above.

 DISCLAIMER

 This software is provided 'as is' with no explicit or implied warranties
 in respect of its properties, including, but not limited to, correctness
 and/or fitness for purpose.
 ---------------------------------------------------------------------------

Source code of this package also as other cryptographic technology and computing project related links are available on Brian Gladman's web site.


Archive options dialog

This dialog combines the following commands: Protect archive, creating recovery volumes, Lock archive. All they are supported only by RAR archive format.

Protecting an archive may help to repair it later in case of small physical damage of the archive data. If you wish to protect an archive from damage, you need to specify a size of the recovery record in percent to the total archive size. Maximum allowed value is 100%. If you set this field to 0, the recovery record will not be added. Larger recovery record allows to recover from more serious damages, but at the same time it increases archive size, so 3 - 5% is probably optimal.

The special case of archive protecting is generating recovery volumes. It is possible only if an opened archive is the first file in the multivolume sequence, in this case you just need to select the number of .rev files to create. You may also append a percent character to this parameter, in such case the number of creating .rev files will be equal to this percent taken from the total number of RAR volumes. Each recovery volume allows to reconstruct one missing volume file. You may read more about this feature here.

If you set "Disable archive modifications" option, an archive will be locked. It means that WinRAR will not be able to modify such archive in future. You may lock important archives to prevent accidental modification by WinRAR.

Recovery volumes has a higher precedence than other options and cannot be combined with them. If you specified non-zero number of .rev files, WinRAR will ignore recovery record and archive lock parameters and will create recovery volumes.


Info-ZIP source code

WinRAR incorporates the source code by the Info-ZIP group, which is used to handle ZIP archives. The original Info-ZIP source code is freely available from ftp://ftp.info-zip.org/pub/infozip/ and www.info-zip.org.

Info-Zip License

This is version 2009-Jan-02 of the Info-ZIP license. The definitive version of this document should be available at ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and a copy at http://www.info-zip.org/pub/infozip/license.html.

Copyright (c) 1990-2009 Info-ZIP. All rights reserved.

For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals:

Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, Rich Wales, Mike White.

This software is provided "as is," without warranty of any kind, express or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the above disclaimer and the following restrictions:

  1. Redistributions of source code (in whole or in part) must retain the above copyright notice, definition, disclaimer, and this list of conditions.

  2. Redistributions in binary form (compiled executables and libraries) must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/or other materials provided with the distribution. Additional documentation is not needed for executables where a command line license option provides these and a note regarding this option is in the executable's startup banner. The sole exception to this condition is redistribution of a standard UnZipSFX binary (including SFXWiz) as part of a self-extracting archive; that is permitted without inclusion of this license, as long as the normal SFX banner has not been removed from the binary or disabled.

  3. Altered versions--including, but not limited to, ports to new operating systems, existing ports with new graphical interfaces, versions with modified or added functionality, and dynamic, shared, or static library versions not from Info-ZIP--must be plainly marked as such and must not be misrepresented as being the original source or, if binaries, compiled from the original source. Such altered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions with the names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP will provide support for the altered versions.

  4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases.


Intel Slicing-by-8 CRC32 algorithm

WinRAR uses CRC32 function based on Intel Slicing-by-8 algorithm.

Original Intel Slicing-by-8 code is available on sourceforge.net/projects/slicing-by-8 and licensed under BSD License available at http://www.opensource.org/licenses/bsd-license.html Text of BSD license is provided below:

Copyright (c) 2004-2006 Intel Corporation.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


License and purchasing information

Select one of the following topics:

  • WinRAR license
  • Purchasing information


"Organize profiles" dialog

In this dialog you may edit some parameters of existing compression profiles or delete them. You cannot create a new profile here, methods of creating a new profile are described in the Compression profiles topic.

To edit profile parameters you need to put the cursor to a profile name, press the "Edit" button and set parameters in the Profile parameters dialog to desired values. Note that compression options stored in the profile cannot be changed, you may modify only a few profile related parameters like its name and default status. If you need to modify compression options, you need to create a new profile having the same name as the existing profile.

To delete a profile put the cursor to its name and press the "Delete" button.

Use "Move up" and "Move down" buttons to move a profile under the cursor in the list.

You may easily find the default profile in the list of profiles in this dialog, it has the small WinRAR icon ("books") to the left of its name.


"Organize themes" dialog

This dialog allows to manage WinRAR interface themes.

Press "Select" to activate the theme under the cursor. Use "Add" button to install a new theme file. "Delete" removes the theme under the cursor from the list and deletes all its files from the disk, so you will not be able to select it again.

"Apply to archive icons" option is global for all themes. If it is turned off, themes will modify only WinRAR graphics, but will not change RAR, ZIP and other archive icons. If it is on, both WinRAR graphics and archive icons are modified. Unlike other commands of this dialog, you need to press "OK" to apply a new value of "Apply to archive icons" option.


Organize passwords

"Organize passwords" dialog provides a way to save frequently used passwords and access them quickly later. It contains the list of password records stored by user. Normally password labels and archive masks are included to this list, but if no label is defined, the password text is displayed instead of label in "Label" column.

You can open "Organize passwords" from usual WinRAR password dialog. Just press "Organize passwords..." button, when you enter the default password or when WinRAR requests a password for encrypted file or archive.

Please be aware that saved passwords are stored in Registry in insecure format. So anybody having access to your computer may be able to retrieve them. While this password organizer feature can make working with passwords more convenient, you need to weigh security risks carefully. If information protected with password is sensitive and confidential, either avoid this feature or use it only if your computer is protected from unauthorized access.

Press "Add" button to add a new password record to the list, at position below the cursor. It will open Password information dialog, where you can specify the password text, label and archive mask. Read Password information dialog topic for more details about these options.

"Delete" button removes all selected password records. Use "Edit" button to modify parameters of password record under the cursor in Password information dialog. "Move up" and "Move down" change the position of all selected passwords in the list.

"Enable autocomplete" option allows the autocomplete feature in password dialog. It is enough to enter first letters of password or password label and if this password or label is found in the list of saved password, WinRAR will propose its full text. Autocomplete feature works only if "Show password" option in password dialog is enabled. If passwords are hidden, autocomplete is disabled. If label is defined for stored password, autocomplete will work only for label and not for password text.

When all modifications of password list in "Organize passwords" dialog are done, you need to press "OK" to save them.

You will be able to access saved passwords in password dialog, either using the drop down list associated with "Enter password" field or utilizing the autocomplete feature.


Confirm file overwrite

The file already exists. You may overwrite it (Yes button), skip (No button), Rename, Rename All files automatically, overwrite all files (Yes to All button), skip all existing files (No to All button) or Cancel the current operation.

If you selected Rename All mode, renamed files will get names like 'filename(N).txt', where 'filename.txt' is the original file name and 'N' is a number.


"Profile parameters" dialog

In this dialog you can describe a new compression profile or edit parameters of an existing profile. It contains the following items:

Profile name

The profile name is a text string describing a profile. It may contain space characters, for example, the name "Create e-mail attachment" is valid. It is recommended to give sensible names to profiles, it simplifies their identification and management. This field is required and cannot be empty

Save archive name

If this option is on, the archive name specified in the field below is saved in the profile and will be restored when selecting this profile. If the option is off, an archive name will be proposed by WinRAR, as usual.

Save selected file names

If this option is on, the file names specified in the field below are saved in the profile. So if you select the profile later, WinRAR will compress files saved in the profile instead of files selected before activating the profile.

Initially this field contains names of files currently selected in WinRAR file list, but you may edit them or enter new names here. Folder names and wildcards are allowed. For example, you may create a profile containing "C:\" as the selected file name to backup the whole C: disk.

If this option is off, WinRAR will compress currently selected files.

Set profile as default

If a profile is marked as default, it will be automatically selected when opening the Archive name and parameters dialog before every archiving operation. It is convenient to create a default profile with your favorite compression options, so you do not need to set them every time. Only one profile can be set as default. If no profiles are marked as default, the archiving dialog will be initialized by the standard set of archiving options.

Some parameters of default compression profile are used not only when adding files to archive, but in other archive modification operations like deleting or renaming files. In this case WinRAR reads only those parameters, which are suitable for current operation. Extraction does not use any options from the default compression profile.

Immediate execution

If you select a profile having the Immediate execution parameter set on, the archiving operation will be started immediately, without possibility to modify compression settings or an archive name. It can be useful for routine compression operations, because you do not need to press the "OK" button every time after selecting such a profile.

Create shortcut on Desktop

This option is available only if Save selected file names option is enabled. If selected, WinRAR will create the icon with a profile name on Desktop, so you may activate a profile later simply clicking on this icon. For example, you may create a profile to backup your data and put its icon to the Desktop to simplify this operation.

Add to context menu

If this option is on, the profile name will be displayed in Explorer context menus allowing to activate a profile from them. If you also set the Immediate execution profile option, archiving will start immediately after choosing a profile in context menu. If Immediate execution is off, you will see Archive name and parameters dialog first. If Save archive name is on, WinRAR will use the saved name for new archive. If Save selected file names is on, both names stored in profile and names selected in Explorer will be added to archive.


Password information dialog

"Password information" dialog is invoked after pressing "Add" or "Edit" buttons in "Organize passwords" dialog. So you can either specify the information about a new password or edit the already existing password record. Such information includes the password text, label, archive mask in "Select for archives" field and "Accept without confirmation" option.

"Password text" is the only mandatory field. It must contain the password to store.

You can use "Password label" field if you do not want real passwords to be visible in the password dialog. So you can specify some label for password here and then enter this label instead of real password every time when you need to set a password. WinRAR will replace such label by password automatically. Password dialog will inform you that you entered a label by displaying "Password label entered" message just above the password input field.

For example, you can define Fhtfl34Shu as the password text and home as the password label. After that you will be able to enter home instead of Fhtfl34Shu. This substitution works only in the password dialog. It does not affect the command line mode and -p[pwd] switch.

Password labels must be unique. They must not be the same as any other label or password. Labels are case insensitive, so home and Home are considered as the same label.

If you defined both the password text and label, the label will be displayed in the list in "Label" column in "Organize passwords" dialog. If only the password text is defined, it will be displayed in this list.

"Select for archives" field can include one or several archive names or masks (name only, without a path) separated by spaces. If archive name contains spaces, it must be enclosed in quotes. If unpacked archive name matches one of these masks, WinRAR will select a password defined in "Password text" automatically. If "Accept without confirmation" option is off, this password will be set as default in password dialog, but user will have a chance to change it. If "Accept without confirmation" option is on, the password will be accepted immediately.

For example, if you specify MailDGWT58 as password text and mymail*.rar mymail*.zip in "Select for archives" field, MailDGWT58 will be selected in password dialog automatically when unpacking mymail*.rar and mymail*.zip archives. This option works for unpacking only, not for archiving.

Please be aware that saved passwords are stored in Registry in the plain text unencrypted format. So anybody having access to your computer can view them. While this password organizer feature can make working with passwords more convenient, you need to weigh security risks carefully. If information protected with password is sensitive and confidential, either avoid this feature or use it only if your computer is protected from unauthorized access.


"Search results" dialog

This dialog contains items found in Find files command. You may select one or more files and then press "Extract To" to unpack them. You may also press "View" to view a file under the cursor or "Locate" to place the cursor to this file in the main WinRAR window.

Because of technical limitations operations with found files are started with some delay if search is active. WinRAR will perform the command only when the currently processing archive is closed.


"Advanced SFX options" dialog

This dialog can be activated from Convert archive to SFX command, by pressing "Advanced SFX options…" button. It allows to specify a number of self-extracting archive parameters like the default destination path, a window title and text. It automatically generates a script using script commands described in the topic dedicated to Windows SFX modules, so you do not need to learn the script language and enter the commands manually, just set the desires options.

Note that SFX parameters are applicable only to Windows GUI module and are not supported by console or non-Windows SFX.

SFX parameters in this dialog are combined to a few sub-dialogs described below:

  • SFX options: General
  • SFX options: Setup
  • SFX options: Modes
  • SFX options: Advanced
  • SFX options: Update
  • SFX options: Text and icon
  • SFX options: License
  • SFX options: Module


SFX commands: Delete

Delete=<filename>

Delete the specified file in the destination folder before extraction. Several Delete commands are allowed.

If a file specified in the Delete command is locked and cannot be deleted, SFX module will try to rename it to temporary name before extraction and delete after Windows reboot. Success of this operation depends on Windows version.

Example

Delete=winrar95.exe

Delete=rarlng.dll


SFX commands: License

License=<title of the license dialog>

{

license text1

license text2

…

}

Display the software license when starting SFX. User may either accept it and continue extraction or decline and quit.

License may be either in HTML or plain text format. In the latter case SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

If text consists of several strings, SFX module considers ‹}› character as the end of text mark, so you should not use this character in your text at the first position in the string. If you need to use ‹}› in the beginning of string, insert the space before it.

Example

License=End user license agreement

{

All copyrights to RAR are exclusively owned by the author.

This program is shareware. Anyone may use this software during a test period.

Following this test period, you MUST register.

}


SFX options: Advanced

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Files to delete in the destination folder

SFX will try to delete the specified file or files in the destination folder before extraction. You may enter more than one file here, in this case file names have to be delimited with spaces.

If a file specified here is locked and cannot be deleted, SFX module will try to rename it to temporary name before extraction and delete after Windows reboot. Success of this operation depends on Windows version.

Corresponding SFX script command - Delete

Shortcuts

Allows to create shortcuts to archived files after unpacking. Press "Add shortcut" button to describe a new shortcut. Parameters of already entered shortcuts are stored in the list below in the same format as described in Shortcut script command. If you wish you may edit here manually.

Corresponding SFX script command - Shortcut

Request administrative access

Set this option if you wish to create SFX archive, which will request the administrative access when started in Windows Vista and later. This option does not change behavior of SFX archive in older Windows versions.

Corresponding command line switch is -iadm.


SFX options: General

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Path to extract

Set the default destination path for unpacked files. You may choose to create it in the user's "Program Files" folder, in the current folder or specify an absolute path here. In first two cases an entered path must not include the disk letter or leading backslash, in the third it must have one of them.

Corresponding SFX script command - Path

Path to extract/Save and restore paths

This option allows SFX to store the destination path entered by user to Registry and then restore it when SFX archive with the same Path to extract contents executed the next time. The original path value is placed to the list associated with the destination path input field, so a user may choose between previously entered and original paths.

This feature may be convenient when installing new versions or upgrades of some software in the same folder. It allows to change the proposed path to desired only once instead of retyping it every time.

It may be used only in combination with non-empty Path to extract field.

Corresponding SFX script command - SavePath

Save current settings as default

This button is displayed only if "Advanced SFX options" dialog is invoked from Convert archive to SFX command. It saves settings entered in all dialog sections. These saved settings are used only when converting an archive to SFX. Use the default compression profile for other archive modification commands.


SFX options: License

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Title of license window

Set the specified text as a title of the license window.

Corresponding SFX script command - License

License text

Display the specified text as software license when starting SFX. User may either accept it and continue extraction or decline and quit.

License may be either in HTML or plain text format. In the latter case SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

Corresponding SFX script command - License.

Load text from file

Load contents of selected file as license text.


SFX options: Modes

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Temporary mode/Unpack to temporary folder

This option forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup program/Run after extraction field and remove the temporary folder including all its contents after completing Setup program. The SFX automatically uses "Hide start dialog" silent mode (described below), when performing these operations, but you can override it by specifying "Hide all" silent mode. Temporary folder with unpacked files is set as the current folder for setup program.

You may also set two optional string parameters, which define a question and question title displayed before extraction. In such case the extraction is started only if a user selects "Yes" button.

If Unpack to temporary folder option is set, you should also specify Setup program. SFX ignores Path to extract parameter in this mode.

This option may fail to work with setup program, which terminates earlier than its child processes. Read TempMode command description for details.

Corresponding SFX script command - TempMode

Silent mode

By default SFX asks for confirmation to start extraction and allows to user to change the destination folder. If you set "Silent mode" to "Hide start dialog" this confirmation will be skipped. Select "Hide all" if you also wish to hide SFX license dialog and the extraction progress.

Corresponding SFX script command - Silent


SFX options: Module

This dialog is a part of the "Advanced SFX options" dialog and allows to choose a self-extracting module. Note that not all modules support advanced SFX options. They are supported by GUI RAR and ZIP modules (Default.SFX and Zip.SFX), but not by console RAR module (WinCon.SFX).


SFX options: Setup

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Setup program/Run after extraction

SFX will try to execute the specified program after successful extraction. The folder containing extracted files is set as the current before executing the program. If a program name contains spaces, it must be enclosed in quotes.

It is allowed to specify several setup programs here, one program per line. If you do not want to start all setup programs simultaneously, set "Wait and return exit code" option.

Read notes to Setup topic for some additional details.

Corresponding SFX script command - Setup

Setup program/Run before extraction

SFX will try to execute the specified program before starting extraction, so this program must already exist on disk. The destination folder is set as the current before executing the program. If a program name contains spaces, it must be enclosed in quotes. You may use this command, for example, to remove a previous version of program, when installing a new version over the old one.

It is allowed to specify several setup programs here, one program per line. If you do not want to start all setup programs simultaneously, set "Wait and return exit code" option.

Corresponding SFX script command - Presetup

Setup program/Wait and return exit code

If this option is on, SFX waits for termination of setup program and returns the exit code of setup program increased by 1000 as the exit code of SFX executable.

If SFX failed to run a setup program because of some error, it returns its own error codes, which are the same as WinRAR exit codes and always less than 1000. You can read SetupCode topic for additional details.

Corresponding SFX script command - SetupCode


SFX options: Text and icon

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Title of SFX window

Set the specified text as a title of the SFX window.

Corresponding SFX script command - Title

Text to display in SFX window

Add the specified plain text or HTML strings to the text output window of SFX module.

In case of plain text contents SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

Corresponding SFX script command - Text

Load text from file

Load contents of selected file as SFX window text.

Load SFX logo from the file

Specify a bitmap image (*.bmp) file to display as logo in the created or updated SFX archive.

Size of default SFX logo is 93x302 pixels. It is recommended to use bitmaps of same size or smaller.

You must not compress SFX module by any third party executable compressors if you are going to use this option.

Corresponding command line switch is -iimg.

Load SFX icon from the file

Replace the standard SFX icon by contained in the proposed .ico file. You must not compress SFX module by any third party executable compressors if you are going to use this option.

Corresponding command line switch is -iicon.


SFX options: Update

This dialog is a part of the "Advanced SFX options" dialog and includes the following settings:

Update mode/Extract and replace files

Extract all archived files regardless of file time.

Update mode/Extract and update files

Extract those files, which copies either not present in the target folder or older than extracting files.

Corresponding SFX script command - Update=U

Update mode/Freshen existing files only

Extract only those files, which exist in the target folder and older than the corresponding file in the archive. If a file not present on disk, it will be skipped.

Corresponding SFX script command - Update=F

Overwrite mode/Ask before overwrite (default)

Prompts before overwriting a file.

Overwrite mode/Overwrite all files

Files are overwritten without any prompt.

Corresponding SFX script command - Overwrite=1

Overwrite mode/Skip existing files

Do not overwrite files which are already exist.

Corresponding SFX script command - Overwrite=2


SFX commands: Overwrite

Overwrite=[n]

If 'n' is 0, the user will be asked before overwriting existing files. It is the default behavior and the Overwrite command does not need to be specified for it. If 'n' is absent or equal to '1', all files are overwritten without a confirmation. If 'n' is equal to '2', all existing files will not be overwritten.

Example

Overwrite=1


SFX commands: Path

Path=<path>

Set the default destination path for unpacked files. Absolute paths started from '<drive letter>:' are used without changes. If <path> contains only a name, it will be appended to the path of the "Program Files" folder. If you wish to disable such behavior and create the specified folder in the current folder, start <path> definition from '.\' characters.

Examples

  1. set the default path to "Program Files\Calc 3.05":

Path=Calc 3.05

  2. set the default path to "C:\Calc":

Path=C:\Calc

  3. set "Calc" folder without any preceding text as the default path:

Path=.\Calc


SFX commands: Presetup

Presetup=<program>

SFX will try to execute <program> before starting extraction, so <program> must already exist on disk. The destination folder is set as the current before executing <program>. You may use this command, for example, to remove a previous version of program, when installing a new version over the old one. If a program name contains spaces, it must be enclosed in quotes.

Example

Presetup=uninstall.exe /clean

Notes

  1. SFX module displays "Extract" button instead of "Install" if no Setup or Presetup commands are present in the archive comment. If you prefer "Install" button, but do not need to execute any setup programs, you can add Setup command without any parameters.


SFX commands: script sample

The script below sets the dialog title to "Calculator 3.05", changes text displayed in the dialog, sets the default extraction path to "Program Files\Calculator", enables overwriting of the already existing files and executes setup.exe after extracting all files.

Title=Calculator 3.05

Text

{

Calculator is shareware. Anyone may use this

software during a test period of 40 days.

Following this test period or less, if you wish

to continue to use Calculator, you MUST register.

}

Path=Calculator

Overwrite=1

Setup=setup.exe


SFX commands: SavePath

SavePath

This command allows SFX to store the destination path entered by user to Registry and then restore it when SFX archive with the same parameter of Path command executed the next time. The original value of Path command is placed to the list associated with the destination path input field, so a user may choose between previously entered and original paths.

This feature may be convenient when installing new versions or upgrades of some software in the same folder. It allows to change the proposed path to desired only once instead of retyping it every time.

SavePath command may be used only in combination with Path command.

Example

Path=Calc 3.05

SavePath


SFX commands: Setup

Setup=<program>

SFX will try to execute <program> after successful extraction. The folder containing extracted files is set as the current before executing <program>. If a program name contains spaces, it must be enclosed in quotes.

Example

Setup=setup.exe

Notes

  1. If you have problems to use SFX to run InstallShield setup.exe, try to execute "setup.exe /SMS" instead of simple "setup.exe". This switch allows SFX to detect termination of the InstallShield setup program.
  2. If application specified in Setup command does not have any parameters, you can use -sp<par> SFX command line switch to pass optional parameters to this application.
  3. SFX module sets sfxname, sfxcmd and sfxpar environment variables before running the setup program. sfxname variable contains a name of SFX archive. sfxcmd variable contains the complete command line received by SFX module. First parameter of this command line is SFX module name. sfxpar contains command line parameters only, without SFX module name. Setup program can read these variables if it needs such information. Also you can specify an expanded %variable% as a parameter, like "Setup=setup.exe %sfxpar%".
  4. SFX module displays "Extract" button instead of "Install" if no Setup or Presetup commands are present in the archive comment. If you prefer "Install" button, but do not need to execute any setup programs, you can add Setup=<> command. Or if you configure SFX archive through SFX options GUI dialog, just specify <> as setup program name. SFX module does not attempt to run a program with such name, but changes the button text.


SFX commands: SetupCode

SetupCode

If this command is present, SFX archive waits until a program specified in Setup or Presetup command finishes and uses its exit code increased by 1000 as the exit code of SFX executable.

If SFX failed to run a setup program because of some error, it returns its own error codes, which are the same as WinRAR exit codes. For example, if SFX execution is failed because of checksum error, SFX process will return 3. If SFX successfully started a setup application and it is completed with zero code, SFX will return 1000. If setup program returned 10, SFX will return 1010.

So if SetupCode code is specified and SFX exit code is less than 1000, something went wrong and setup was not even started. If setup application uses 0 code to define success and non-zero for failure, SFX exit code 1000 indicates a success and anything else is a failure.

If several Setup and Presetup commands are used and SetupCode is present, SFX will wait for every Setup and Presetup command and return a largest code returned by setup applications.

Example

Setup=setup.exe

SetupCode


SFX commands: Shortcut

Shortcut=<DestType>,<SrcName>,<DestFolder>,<Description>,<ShortcutName>,<ShortcutIcon>

Create a shortcut to unpacked file.

DestType is one character wide field, which can have the following values:

D | Create a shortcut on Desktop
P | Create a shortcut in Start Menu/Programs
T | Create a shortcut in Startup folder

SrcName is a name of archived file.

DestFolder is a folder to create a shortcut in. If it does not exist, it will be created by SFX archive.

Description is a text string describing a shortcut.

ShortcutName is a name of .lnk (shortcut) file created by SFX.

ShortcutIcon is a name of icon file associated with shortcut. If you omit this parameter, the default icon will be used. If icon file name does not contain the full path, SFX archive will search the icon file in folder containing unpacked files.

All parameters are separated by commas. If you need to put a comma character inside of parameter, enclose the whole parameter to quotes. Repeat quotes twice if you need to insert a quote mark into string. Only DestType and SrcName are required, other parameters are optional.

Example

Create a shortcut in folder WinRAR on Desktop to archived file winrar.exe with the description "WinRAR executable file", name "WinRAR archiver" and icon winrar.ico:

Shortcut=D, winrar.exe, WinRAR, "WinRAR executable file", "WinRAR archiver", winrar.ico


SFX commands: Silent

Silent[=Param]

Start extraction without displaying the start dialog.

Param can be either 1 or 2.

If Param is 1, the start dialog is completely hidden, including the progress bar and file names. Also in this mode SFX does not display the license dialog.

If Param is omitted or equal to 2, the confirmation to start extracting is skipped, but users still see the archive extraction progress.

Example

Silent=2


SFX commands: TempMode

TempMode=[Question][,Title]

This command forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup command and remove the temporary folder including all its contents after completing the Setup program. The SFX automatically sets the silent mode to 2 to skip the start dialog when performing these operations, but you can override it by specifying Silent command with another parameter. Temporary folder with unpacked files is set as the current folder for setup program.

TempMode command may have the optional string parameter, which is used to define a question and question title displayed before extraction. In such case the extraction is started only if user selects "Yes" button.

If TempMode command is present, a script should also have Setup command. Path command is ignored in this mode.

In TempMode SFX needs to detect the termination of setup program to delete temporary files. Such approach works correctly if setup program is not terminated before installation is done. But sometimes the setup program starts a child process and terminates, expecting a child process to complete installation. In such case SFX deletes temporary files immediately after detecting that main setup application is finished, resulting in malfunctioning child process. So TempMode works correctly only with those setup programs, which do not start another processes or, at least, are not terminated until all child processes are finished.

Examples

a) TempMode

b) TempMode=Do you wish to continue installation of Calculator 3.05?, Calculator setup


SFX commands: Text

This command supports two versions of the syntax:

Text=<string>

Text

{

string1

string2

…

}

It adds the specified plain text or HTML strings to the text output window of SFX module. When SFX module encounters Text command the first time, it resets the default contents of this window before adding <string>. Following commands append <string> to the already existing text.

Depending on the used syntax this command may add either a single string or several strings at once.

In case of plain text contents SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.

Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.

If text consists of several strings, SFX module considers ‹}› character as the end of text mark, so you should not use this character in your text at the first position in the string. If you need to use ‹}› in the beginning of string, insert the space before it.

Examples

  1. add the single string to the dialog window

Text=Here is my new program

  2. add the specified text to the dialog window

Text

{

Most interesting features of this program are:

- support of the Windows Clipboard;

- processing of files up to 10KB size each;

}


SFX commands: Title

Title=<title>

Set a title of SFX window.

Example

Title=Calculator, version 3.05


SFX commands: Update

Update=<c>

<c> parameter can be either U or F character.

If <c> is U, SFX module will extract files, which copies are not already present on the disk, and files newer than their copies on the disk.

If <c> is F, SFX module will extract only those files, which are newer than their copies on the disk. If copy of extracted file is not present in destination folder, file will not be extracted in F mode.

Example

Update=U


Select toolbar buttons

In this dialog you may specify toolbar buttons to display when browsing a disk folder ("Show outside of archives" group of options) or viewing archive contents ("Show inside of archives" options). It is also possible to change the buttons order, just select buttons to move and press "Move up" or "Move down" to change their position. If you wish to restore the default toolbar configuration, press "Default" button.

"Separator" button inserts a separator line just before the currently selected button. If you need to remove a separator, either turn off its check mark or place the cursor to it and then press "Separator" button.

Additionally to this dialog you may also drag toolbar buttons directly on the toolbar while holding down the Alt key.