打印

[ASP在线教程] asp在服务器自动解压rar文件

asp在服务器自动解压rar文件

<%
dim ylj,ywj,mlpath,shell,rarcomm,retcode,cmd,comm,fso

mlpath="e:\page\mian\"    '存放rar.exe和cmd.exe的路径
ylj=server.mappath("mian")&"\"  '解压文件后所放的路径
ywj=server.mappath("mian\apathy.rar")  '要解压的rar文件
set shell = server.createobject("wscript.shell")
rarcomm= "e:\page\mian\cmd.exe /c "&mlpath&"rar.exe x -t -o+ -p- "
cmd=rarcomm&ywj&" "&ylj
retcode = shell.run(cmd,1, true)
%>
   就是用server.createobject("wscript.shell")来执行cmd.exe来运行rar.exe文件来解压rar文件的。



TOP

返回顶部
AYBlue

Processed in 0.040350 second(s), 7 queries.

当前时区 GMT+8, 现在时间是 2009-1-8 14:57 京ICP备06054220号

清除 Cookies - 联系我们 - 163K.com - Archiver - WAP