Cainiao can decompress the rarfile in ASP.

Source: Internet
Author: User
Cainiao can decompress the rarfile in ASP.
Wen/Chen Cheng

Have you ever thought about extracting compressed files online? Sometimes, after uploading a compressed package, it is very convenient to decompress it using Asp programs. Especially for webmasters who often update websites, due to the large compression ratio of text files, compression is used to upload and decompress the package, this saves a lot of valuable time than direct upload. Are you ready? Let's keep up.

The hosts file is "taken" separately .), In addition, the Windows operating system's own. exeprogram (this program is used to execute the winrar.exe file. The operating system that comes with the NT kernel can be found in the System32 folder under the operating system installation directory; for Windows 9X operating systems, you can find them in the System folder under the operating System installation directory .). Upload them to the same directory. To create an asp file, see the following code:

<%
Dim a, B, Main, Shell, Runing, Runcode, Cmd, comm, fso
Main = "d:/Cheng/rar.
A = Server. mappath ("rar") & "'specifies the storage path after extracting the rarfile.
B = Server. mappath ("rar/homepage.rar") 'To decompress the rarfile and change homepage.rar to the file to be decompressed.
Set Shell = Server. CreateObject ("WScript. Shell ")
Runing = "d:/chencheng/rar/cmd.exe/c" & Main & "Winrar.exe x-t-o +-p-" 'sets the command for running the decompression.
Cmd = Run & B & "" &
Runcode = Shell. Run (Cmd, 1, True)
%>


To be honest, please note the power from cool (www. ASPCOOL. COM ).

 

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.