How to extract files from the command line in WinRAR?
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 on the command line.
In this case the name of the file, containing the list
of files to be archived, must be given on the command
line. This is indicated by placing the symbol @ before this file name. Thus, if you create a file, Binaries,
containing the strings *.exe and *.com, execute the
command:
WINRAR X TOOLS @Binaries
all files with EXE and COM extensions from the archive
TOOLS will be extracted to the current folder.
During the extraction process, a window containing statistics,
will be displayed. 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 extraction
is completed, without problems, WinRAR will terminate,
in the case of an error, a Diagnostic message window
will be displayed.
|