On-line decompression of uploaded winrar files

Source: Internet
Author: User
Tags rar
winrar| Upload | compress | online <%
' First of all, reduce the browser security level
The ' Csdb folder contains cmd.exe Rar.exe files to extract (*.rar) after decompression, the storage directory is CSDB
On Error Resume Next
Unzip_path=server.mappath ("Csdb") & "\"
Set WshShell = server. CreateObject ("Wscript.Shell")
issuccess = Wshshell.run ("WinRAR x-r-o+" &unzip_path& "*.rar" &unzip_path& "", 1, False)
' WinRAR < command >-< switch 1>-< switch n> < compressed file > < file ...> <@ list file ...> < decompression path \>
' Command: X-Extract files from full path in compressed file
' Switch:-R-Together with subfolders
' Switch:-o+-overwrite files already in existence
' Switch:-o--do not overwrite files that already exist
If issuccess = 0 Then
Response.Write "Command executed successfully! "
Else
Response.Write Command Execution failed! Insufficient permissions or the program cannot run in DOS
End If
If Err.Number <> 0 Then
Response.Write "<p> Error Number:" & Err.Number
Response.Write "<p> Reason:" & Err.Description
Response.Write "<p> Source of Error:" & Err.Source
Response.Write
End If
%>



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.