Use JavaScript to operate WinRAR

Source: Internet
Author: User

You must first save it to local <textarea id="runcode5028"><Label> select a file <br/> <input type = "file" name = "sfile" id = "sfile"> </label> <br/> <label> <br/> <input type = "button" name = "button" value = "button" onclick = "runrar () "> <textarea ROW =" 5 "Col =" 50 "id =" showcmd "></textarea>

[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]

The following are related commands:

Task Description
WinZip
WinRAR

Compressing the file content of the test directory and Its subdirectories
Wzzip test.zip test-r-p
WinRAR A test.rar test-R

Delete the *. txt file in the compressed package
Wzzip test.zip *. txt-d
WinRAR D test.rar *. txt

Refresh the files in the compressed package, that is, add files that already exist in the compressed package but are updated
Wzzip test.zip test-F
WinRAR F test.rar Test

Update the files in the compressed package, that is, add the files that already exist in the compressed package but are updated and the new files
Wzzip test.zip test-u
WinRAR U test.rar Test

Move the file to the compressed package, that is, add the file to the compressed package and then delete the compressed file.
Wzzip test.zip-r-p-m
WinRAR M test.rar test-R

Add all *. EXE files to the compressed file, but exclude files with names starting with A or B.
Wzzip test *. exe-XF *. *-xB *.*
WinRAR a test *. exe-XF *. *-xB *.*

Compress with a password
Wzzip test.zip test-S123. Note that the password is case sensitive. (There is no space between-s and password)
WinRAR A test.rar test-p123-R. Note that the password is case sensitive. (There is no space between-P and password)

Sort by name and display compressed package files in a brief list
Wzzip test.zip-VBN
RAR l test.rar

Lock the compressed package to prevent any modifications to the compressed package in the future.
No corresponding command
WinRAR K test.rar

Create a kb compressed package
No corresponding command
WinRAR A-v360 Test

Decompress the directory information
Wzunzip test-d
WinRAR X test-R

Extract files without directory information
Wzunzip Test
WinRAR E test

Decompress the file to the specified directory. If the directory does not exist, it is automatically created.
Wzunzip test newfolder \
WinRAR X test newfolder \

Decompress the file and confirm to overwrite the file
Wzunzip test-y
WinRAR X test-y

Related Article

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.