时间:2021-05-28
复制代码 代码如下:
<%
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\1.c:\windows\system32\cmd.exe
'\\拷贝把本文件所在的路径
'\\
'\\2.把c:\program\winrar\rar.exe
'\\拷贝把本文件所在的路径并改名为WinRAR.exe
'\\
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\compressPath(byVals)
'\\压缩文件的路径|字符串变体
'\\
'\\decompressPath(byVals)
'\\解压缩文件的文件夹|字符串变体
'\\
'\\compress
'\\在线压缩
'\\
'\\decompress
'\\在线解压缩
'\\
'\\POWERBYnever-online
'\\
'\\EMAIL:Bluedestiny[at]126.com
'\\
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
OPTIONEXPLICIT
classCOMPRESS_DECOMPRESS_FILES
privateversion,copyright
privateoWshShell,oFso
privatesCompressPath,sDecompressPath
privatesubclass_initialize
version="COMPRESS_DECOMPRESS_FILESBUILDER20051015"
copyright="POWERBYMIRACLE(BLUEDESTINY)"
SetoFso=server.CreateObject("scripting.FileSystemObject")
SetoWshShell=server.CreateObject("Wscript.Shell")
writeLn(version+"<br>"+copyright)
endSub
privatesubclass_terminate
ifisobject(oWshShell)thensetoWshShell=nothing
ifisobject(oFso)thensetoFso=nothing
endSub
privatefunctionphysicalPath(byVals)
physicalPath=server.mappath(s)
endFunction
privatesubvalidateFile(byVals)
ifoFso.FileExists(s)thenexitsub
ifoFso.FolderExists(s)thenexitsub
callErr"file(folder)notexists!"
endSub
privatesubcreateFolder(byVals)
ifoFso.FolderExists(s)thenexitSub
oFso.createFolder(s)
endSub
privatesubwriteLn(byVals)
response.write"<p>"+s+"</p>"+vbCrlf
endSub
privatesubcallErr(byVals)
writeLn"<p><b>ERROR:</b></p>"+s
response.End
endsub
privatesubcallSucc(byVals)
writeLn"<p><b>SUCCESS:</b></p>"+s
endSub
publicsubcompress
validateFile(sCompressPath)
oWshShell.run("WinRARA"+sCompressPath+""+sDecompressPath&"")
ifErr.number>0thencallErr("compresslost!")
callSucc("compress<b>"+sDecompressPath+"</b>to<b>"+sCompressPath+".rar</b>successfully!")
endSub
publicsubdecompress
validateFile(sCompressPath)
createFolder(sDecompressPath)
oWshShell.run("WinRARX"+sCompressPath+""+sDecompressPath&"")
ifErr.number>0thencallErr("decompresslost!")
callSucc("decompress<b>"+sCompressPath+".rar</b>to<b>"+sDecompressPath+"</b>successfully!")
endsub
publicpropertyLetcompressPath(byVals)
sCompressPath=physicalPath(s)
endproperty
publicpropertyLetdecompressPath(byVals)
sDecompressPath=physicalPath(s)
endproperty
Endclass
%>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTML>
<HEAD>
<TITLE>asp在线解压缩</TITLE>
<METANAME="Generator"CONTENT="EditPlus">
<METANAME="Author"CONTENT="">
<METANAME="Keywords"CONTENT="">
<METANAME="Description"CONTENT="">
<style>
*{
font-size:10.2pt;
font-family:tahoma;
}
</style>
</HEAD>
<BODY>
<%
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\设有压缩文件compress.rar
'\\需压缩文件decompressFolder文件夹
'\\
'\\将compress.rar解压缩至1文件夹
'\\将decompressFolder文件夹压缩至2.rar
'\\
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
dimoExample
setoExample=newCOMPRESS_DECOMPRESS_FILES
oExample.compressPath="decompressFolder"
oExample.decompresspath="1"
oExample.compress
oExample.compressPath="compress"
oExample.decompresspath="2"
oExample.decompress
setoExample=nothing
%>
</BODY>
</HTML>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
(四)Tomcat 1、用WinZIP等解压缩软件把tomcat.zip解压缩到一个目录下,我把它解压缩到C:\,它会自动 创建tomcat子目录
7zip支持格式: 压缩/解压缩:7z,XZ,BZIP2,GZIP,TAR,ZIPandWIM 仅解压缩:ARJ,CAB,CHM,CPIO,CramFS
本文实例讲述了C#实现的文件压缩和解压缩类。分享给大家供大家参考。具体分析如下:这个C#代码包含了几个类,封装了文件压缩和解压缩常用的方法,包括直接通过代码进行
7zip简介格式支持压缩解压缩仅支持解压缩安装DebianubuntuArchlinux使用打包解压列出文件的信息列表检查包的完整性更新压缩包删除包里的文件使用
1.解压缩nginx-1.8.1.tar.gz2.解压缩fastdfs-nginx-module-master.zip3.进入nginx-1.8.1目录中4.执