rar x -pMyPassword archive.rar D:\Extracted\
| Switch | Effect |
|--------|--------|
| -r | Include subfolders |
| -rr10 | Add 10% recovery record |
| -ep1 | Exclude base path from names |
| -o+ | Overwrite existing files |
| -ibck | Run in background |
| -agYYYYMMDD | Add date to archive name |
Example with switches:
rar a -r -ep1 -m5 backup.rar C:\MyDocs
Create a file backup.bat:
@echo off
set DATE=%date:~-4,4%%date:~-10,2%%date:~-7,2%
rar a -r -m5 -agYYYYMMDD "D:\Backups\server_backup_.rar" "C:\ImportantData"
echo Backup completed on %DATE%
pause
WinRAR’s origin traces to the mid-1990s when file compression and archive formats were essential for transferring files over limited-bandwidth networks and storing large datasets efficiently. Eugene Roshal developed the RAR format and the WinRAR application as an alternative to existing tools like PKZIP and ARJ. Over time, WinRAR evolved with regular updates adding features, improving compression algorithms, and expanding platform support (Windows being primary, with command-line ports and compatible tools for other systems).
rar x archive.rar
Extract to specific folder:
rar x archive.rar C:\output\
| Switch | Effect | Usage |
|--------|--------|-------|
| -r | Recurse subdirectories | rar a -r archive.rar folder\ |
| -m5 | Maximum compression (0-5) | rar a -m5 archive.rar file.txt |
| -p | Add password | rar a -pMySecret archive.rar * |
| -ep1 | Exclude base path from names | rar a -ep1 archive.rar C:\data\* |
| -ad | Append archive name to extract path | rar x -ad archive.rar |
| -o+ | Overwrite existing files | rar x -o+ archive.rar |
| -rr10| Add 10% recovery records | rar a -rr10 archive.rar bigfile.iso |
Run the installer with the /S flag to install without prompts: tel winrar
winrar-x64-621.exe /S
This installs WinRAR to C:\Program Files\WinRAR\ by default.
rar e archive.rar