Menu

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.