调用winrar无法压缩文件成zip
thispath=server.mappath(".")&"\" '存放RAR.EXE和CMD.EXE的路径
zipfolder=server.mappath(".")&"\*.xml" '要压缩的文件或文件夹
rarfile = server.mappath(".")&"\date.zip"
Set Shell = Server.CreateObject("WScript.Shell")
if err.number<>0 then
response.write "服务器不支持"
response.end
end if
cmd= thispath&"cmd.exe /c "&thispath&"winrar.exe a "&rarfile&" "&zipfolder&""
RetCode = Shell.Run(cmd,1,True)
response.write "执行成功!"
if err.number<>0 then
response.write ""&RetCode&""
else
response.write err.description
end If
高手帮忙看下这段代码哪里有问题,为什么无法压缩成zip文件呢?