LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

ASP解压缩(在线解压缩类)

admin
2011年2月16日 10:21 本文热度 2509

<%
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\ 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
public property Let compressPath(byVal s)
sCompressPath=physicalPath(s)
end property
public property Let decompressPath(byVal s)
sDecompressPath=physicalPath(s)
end property
End class
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> asp在线解压缩 </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style>
* {
font-size:10.2pt;
font-family:tahoma;
}
</style>
</HEAD>
<BODY>
<%
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\ 设有压缩文件 compress.rar
'\\ 需压缩文件 decompressFolder 文件夹
'\\
'\\ 将 compress.rar 解压缩至 1 文件夹
'\\ 将 decompressFolder 文件夹 压缩至 2.rar
'\\
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
dim oExample
set oExample=new COMPRESS_DECOMPRESS_FILES
oExample.compressPath="decompressFolder"
oExample.decompresspath="1"
oExample.compress
oExample.compressPath="compress"
oExample.decompresspath="2"
oExample.decompress
set oExample=nothing
%>
</BODY>
</HTML>


该文章在 2011/2/16 10:21:29 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved