国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

ASP解壓縮(在線解壓縮類)

2024-05-04 10:58:36
字體:
供稿:網(wǎng)友
復(fù)制代碼 代碼如下:

<%
'///////////////////////////////////////////////////////////
'//
'// 1. c:/windows/system32/cmd.exe
'// 拷貝把本文件所在的路徑
'//
'// 2. 把 c:/program/winrar/rar.exe
'// 拷貝把本文件所在的路徑 并改名為WinRAR.exe
'//
'///////////////////////////////////////////////////////////
'//
'// compressPath(byVal s)
'// 壓縮文件的路徑 | 字符串變體
'//
'// decompressPath(byVal s)
'// 解壓縮文件的文件夾 | 字符串變體
'//
'// compress
'// 在線壓縮
'//
'// decompress
'// 在線解壓縮
'//
'// POWER BY never-online
'//
'// EMAIL : Bluedestiny[at]126.com
'//
'///////////////////////////////////////////////////////////

OPTION EXPLICIT

class COMPRESS_DECOMPRESS_FILES

 private version, copyright
 private oWshShell, oFso
 private sCompressPath, sDecompressPath 

 private sub class_initialize
 version="COMPRESS_DECOMPRESS_FILES BUILDER 20051015"
 copyright="POWER BY MIRACLE (BLUEDESTINY)"
 Set oFso=server.CreateObject("scripting.FileSystemObject")
 Set oWshShell=server.CreateObject("Wscript.Shell")
 writeLn(version+"<br>"+copyright)
 end Sub
 private sub class_terminate
 if isobject(oWshShell) then set oWshShell=nothing
 if isobject(oFso) then set oFso=nothing
 end Sub
 private function physicalPath(byVal s)
 physicalPath=server.mappath(s)
 end Function
 private sub validateFile(byVal s)
 if oFso.FileExists(s) then exit sub
 if oFso.FolderExists(s) then exit sub
 callErr "file(folder) not exists!"
 end Sub
 private sub createFolder(byVal s)
 if oFso.FolderExists(s) then exit Sub
 oFso.createFolder(s)
 end Sub
 private sub writeLn(byVal s)
 response.write "<p>" + s + "</p>" + vbCrlf
 end Sub
 private sub callErr(byVal s)
 writeLn "<p><b>ERROR:</b></p>" + s
 response.End
 end sub
 private sub callSucc(byVal s)
 writeLn "<p><b>SUCCESS:</b></p>" + s
 end Sub

 public sub compress
 validateFile(sCompressPath)
 oWshShell.run("WinRAR A " + sCompressPath + " " + sDecompressPath & "")
 if Err.number>0 then callErr("compress lost!")
 callSucc("compress <b>" + sDecompressPath + "</b> to <b>" + sCompressPath + ".rar</b> successfully!")
 end Sub
 public sub decompress
 validateFile(sCompressPath)
 createFolder(sDecompressPath)
 oWshShell.run("WinRAR X " + sCompressPath + " " + sDecompressPath & "")
 if Err.number>0 then callErr("decompress lost!")
 callSucc("decompress <b>" + sCompressPath + ".rar</b> to <b>" + sDecompressPath + "</b> successfully!")
 end sub
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 古交市| 刚察县| 高陵县| 云浮市| 广汉市| 新郑市| 泸水县| 建始县| 柳林县| 东乌珠穆沁旗| 济南市| 高安市| 西乌| 偏关县| 渑池县| 黄山市| 大兴区| 陆良县| 九龙坡区| 浠水县| 新巴尔虎左旗| 扶绥县| 双城市| 松溪县| 黔江区| 大渡口区| 河北省| 青阳县| 灵璧县| 买车| 凌云县| 丁青县| 康马县| 邻水| 仁化县| 仁布县| 天峻县| 宁德市| 云霄县| 锡林郭勒盟| 赤壁市|