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文件的。
相关推荐
taiyangshenniao 2020-04-18
zmjzhangmj 2013-06-24
wanghongsha 2019-12-16
FruitDrop 2013-08-22
gdb 2019-11-14
hellvulture 2015-03-25
dguthai 2015-01-29
xiaobaichen 2015-07-16
heiworld 2015-05-21
登峰小蚁 2019-11-07
yboker 2019-07-10
doITwhat 2017-03-07
89231441 2017-07-19
Rafema 2017-12-01
liuyanwuyu 2017-07-19