WinRAR command line parameters

Source: Internet
Author: User

Usage: RAR <command>-<switch 1>-<switch n> <compressed file> <file...>
<@ List file...> <decompress path ">

<Command>
A. Add the file to the compressed file.
C. Add a compressed file comment.
Cf add file comment
CW writes compressed file comments to file
D. delete the files in the compressed file.
E. decompress the compressed file to the current directory.
F. Refresh the files in the compressed file.
I [parameter] = <string> Search for strings in the compressed file
K. Lock the compressed file
L [T, B] list compressed files [technical information, concise]
M [f] Move to a compressed file [only for files]
P print the file to the standard output device
R fix compressed files
RC rebuild the lost volume
Rn rename the compressed file
Rr [N] add data recovery records
RV [N] Create recovery volume
S [name |-] convert the compressed file to the self-decompressed format or convert it back to the compressed file
T test compressed files
U updates files in the compressed file
V [T, B] detailed list of compressed files [technical information, concise]
X decompress the file using the absolute path

<Switch>
-Stop Scanning
After the AC is compressed or unzipped, the archive attributes are cleared.
AD: Add compressed file names to the target path
Ag [format] uses the current date to generate compressed file names
AO adds files with compression attributes
AP <format> Add path to compressed file
As: synchronously compress File Content
Add User identity verification for AV (only available in the registered version)
AV-Disable User identity verification
C-Disable annotation display
CFG-Disable read Configuration
CL name to lowercase
Convert Cu name to uppercase
Delete files after DF Compression
DH open shared files
DS disables name sorting for solid compressed files
E [+] <attribute> sets file exclusion and includes attributes
Ed does not add an empty directory
En does not add the "compressed file end" flag
EP exclusion path from name
Exclude the basic directory from the name of EP1
Expand EP2 to complete path
The EP3 extension path is the full path containing the drive letter.
F. Refresh the file
HP [Password] encrypts both file data and file headers
Id [c, d, p, q] disable messages
Ieml [attribute] use e-mail to send compressed files
Ierr sends all messages to standard error Devices
Ilog [name] writes errors to log files (only available in the registered version)
Inul disables all messages
After ioff completes an operation, turn off the PC power supply.
Enable isnd sound
K. Lock the compressed file
KB retains damaged decompressed files
M <0 .. 5> sets the compression level (0-storage... 3-default... 5-maximum)
MC <parameter> set advanced Compression Parameters
MD <size> dictionary size in KB (64,128,256,512,102, 4096, or A-G)
MS [ext; Ext] specifies the file type to store
N <File> only contains the specified file
N @ read the file name from the standard input device to include
N @ <list> include files in the specified file list
O + overwrite existing files
O-Do Not Overwrite existing files
Set NTFS compression attribute for OC
OS saves NTFS streams
Ow save or restore the file owner and group
P [Password] Set Password
P-No Password inquiry
R recursive subdirectory
R0 only subdirectories with recursive wildcard names
RI <p> [: <S>] sets the priority (0-default, 1-minimum... 15-maximum) and sleep time in milliseconds.
Rr [N] add data recovery records
RV [N] Create recovery volume
S [<n>, V [-], E] create a solid compression File
S-Disable solid-state compressed files
SFX [name]: Create a self-extracting compressed file
St [name] Reading data from standard input device (stdin)
T compressed Test File
File Modified after ta <date> Add date <date>, in the format of yyyymmddhhmmss
File Modified before TB <date> Add date <date>, in the format of yyyymmddhhmmss
TK retention time of the original compressed file
TL sets the compressed file time to the latest file time
Files after tn <time> Add <time>
To <time> add files earlier than <time>
TS <m, C, A> [N] file retention or recovery time (modify, create, access)
U Update file
V automatically checks the size of the created volume or lists all the volumes.
V <size> [K, B] Create volume size = <size> * 1000 [* 1024, * 1]
Clear disk content before VD creates capacity
Ver [N] file version control
Vn uses the old-style volume naming scheme
VP is paused before each volume
W <path> specify the working directory
X <File> exclude specified files
X @ read the file name to be excluded from the standard input device
X @ <list> exclude objects in a specified list file
Y. If yes
Z <File> read comments from compressed files

For example:

1. Create a batch file with only one line working in it :)

========================================================

Backfav. BAT (name can be set as needed) file content:

Rem this batch file is used to automatically back up my favorites
Rem WinRAR <command>-<switch 1>-<switch n> <compressed file> <file...> <@ list file...> <decompress path ">
"D:" Program Files "WinRAR" winrar.exe "a-as-r-SFX -zsfxpara.txt-EP1" D: "My Documents" favorites.exe "" % USERPROFILE % "favorites"

========================================================== =

Parameter description:

A: add the specified file (source directory, "% USERPROFILE %" favorites ") and folder to the compressed file (target file," d: "My Documents" favorites.exe ").

-As: This is a switch, that is, the method for adding "synchronizing compressed file content"

-R: "contains subfolders"

-SFX: indicates that a self-extracting file is created.

-Zsfxpara.txt: read the comments of compressed files from the sfxpara.txt file. What are the comments?

-EP1: the path % USERPROFILE % is not saved in the compressed file.

2. comment on the role of the file

When creating a compressed file, consider not only compressing those files, but also how to decompress them. Through the annotation file, you can pass a lot of useful information to the compressed package.

Sfxpara.txt content:

Path = % USERPROFILE %"
Silent = 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.