WinZip and WinRAR command-line usage

Source: Internet
Author: User
Tags rar

In addition to providing a rich and flexible graphical interface operation, WinZip and WinRAR also have the ability to compress and decompress files from the command-line mode, which makes it very convenient for us to call compression software in batch files. The following are the common command line usage methods for both: [@[email protected]]
Prepare to run the environment
First, prepare WinZip command line run environment
WinZip graphics operation mode and command line operation mode are separate 2 functions, so to use WinZip command line mode, to download and install WinZip graphics mode software Wzbeta32.exe and WinZip command-line mode software Wzcline.exe, after installation there will be 2 executable files: Wzzip.exe is the command line mode compression execution file, Wzunzip.exe is the command line mode decompression file. To execute them under any command-line mode path, copy the 2 executables to the system directory, such as C:windows.
Second, prepare WinRAR command line running environment
After downloading and installing RAR, in the installation directory will be generated Winrar.exe and Rar.exe,winrar.exe is WinRAR graphical interface program, also as a command line execution program, Rar.exe is a pure command line execution program. Similarly, in order to execute it under any command-line mode path, copy the execution file to the system directory, such as C:windows.
Help information
In the command line state, enter the Wzzip, wzunzip, or rar without parameters to print out the Help information
Examples of commonly used compression and decompression operations
In the following example, we compare the basic compression and decompression operation commands of WinZip and WinRAR. Assume that the compressed package file is named and Test.rar.
Task description
Winzip Winrar
Compress the file contents of the catalog test and its subdirectories
Wzzip Test-r-P
WINRAR A Test.rar Test-r
To delete a *.txt file in a compressed package
Wzzip *.txt-d
WinRAR D Test.rar *.txt
Refreshes the files in the compressed package, adding files that already exist in the package but are updated
Wzzip test-f
Winrar F Test.rar Test
Update files in a compressed package, add files that already exist in the package but are updated, and new files
Wzzip Test-u
Winrar u test.rar Test
Move files to a compressed package, that is, add files to the compressed package and then delete the compressed files
Winrar m Test.rar test-r
Add all *.exe files to a compressed file, but exclude files with a or B start name
Wzzip Test *.exe-xa*.*-xb*.*
WinRAR a Test.rar test *.exe-xa*.*-xb*.*
Add password to compress
Wzzip test-s123. Note that passwords are case-sensitive.
WINRAR A Test.rar test-p123-r. Note that passwords are case-sensitive.
Sort the compressed package file by name, in a brief list
Rar L Test.rar
Lock the package, which prevents any future modifications to the package
WinZip has no corresponding command
Winrar k Test.rar
To create a 360kb-sized, sub-volume compressed package
WinZip has no corresponding command
Winrar a-v360 Test
Tape directory information Extract file
Winrar x test.rar-r
Extract files without the catalog information
Winrar e Test
Unzip the file to the specified directory, and if the directory does not exist, automatically creates
Wzunzip Test,zip NewFolder
Winrar x Test.rar NewFolder
Unzip the file and confirm the overwrite file
Winrar x test.rar-y
Unzip a specific file
Wzunzip Test *.txt
Winrar x Test *.txt
Unzip an update file for an existing file
Winrar x test.rar-f
Unzip the updated file and new file of the existing file
Wzunzip Test-n
Winrar x test-u
Bulk Unzip files
Wzunzip *.zip
WinRAR e *.rar

WinZip and WinRAR command-line use

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.