日韩欧美国产精品免费一二-日韩欧美国产精品亚洲二区-日韩欧美国产精品专区-日韩欧美国产另-日韩欧美国产免费看-日韩欧美国产免费看清风阁

LOGO OA教程 ERP教程 模切知識交流 PMS教程 CRM教程 開發文檔 其他文檔  
 
網站管理員

asp在線壓縮和解壓縮文件(文件夾)

admin
2011年2月26日 18:23 本文熱度 3306
<%
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\    1. c:\windows\system32\cmd.exe
'\\       拷貝把本文件所在的路徑
'\\
'\\    2. 把 c:\program\winrar\rar.exe
'\\       拷貝把本文件所在的路徑 并改名為WinRAR.exe
'\\
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'\\
'\\    compressPath(byVal s)
'\\    壓縮文件的路徑 | 字符串變體
'\\
'\\    decompressPath(byVal s)
'\\    解壓縮文件的文件夾 | 字符串變體
'\\
'\\    compress
'\\    在線壓縮 | sub
'\\
'\\    decompress
'\\    在線解壓縮 | sub
'\\
'\\    POWER BY MIRACLE (BLUEDESTINY)
'\\
'\\    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> New Document </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.rar"
oExample.decompresspath="2"
oExample.decompress
set oExample=nothing
%>
</BODY>
</HTML>

該文章在 2011/2/26 18:23:50 編輯過
關鍵字查詢
相關文章
正在查詢...
點晴ERP是一款針對中小制造業的專業生產管理軟件系統,系統成熟度和易用性得到了國內大量中小企業的青睞。
點晴PMS碼頭管理系統主要針對港口碼頭集裝箱與散貨日常運作、調度、堆場、車隊、財務費用、相關報表等業務管理,結合碼頭的業務特點,圍繞調度、堆場作業而開發的。集技術的先進性、管理的有效性于一體,是物流碼頭及其他港口類企業的高效ERP管理信息系統。
點晴WMS倉儲管理系統提供了貨物產品管理,銷售管理,采購管理,倉儲管理,倉庫管理,保質期管理,貨位管理,庫位管理,生產管理,WMS管理系統,標簽打印,條形碼,二維碼管理,批號管理軟件。
點晴免費OA是一款軟件和通用服務都免費,不限功能、不限時間、不限用戶的免費OA協同辦公管理系統。
Copyright 2010-2025 ClickSun All Rights Reserved

主站蜘蛛池模板: 五月天婷婷网亚洲综合在线 | 免费在线中文字幕 | 日韩精品一区二区三区在线 | 国产香蕉人在线播放视频网站 | 国产一区二区视频免费 | 国产亚洲精品一级在线观看 | 亚洲天堂在线视频观看 | 日本三级强在线观看 | 亚洲欧美中文高清在线专区 | 国产欧美精品区一区二区三区 | 欧美视频亚洲视频日韩动漫 | 精品蜜臀一区二区三区在线 | 国产亚洲精品aa | 亚洲一区二区偷拍第一页 | 性生交大全免费看 | 国产欧美日韩精品第二区 | 国产在在 | 日韩精品一区二区免费在线观看 | 国产乱子伦高清对白 | 午夜影视在线播放免 | 色拍自拍亚洲综合图区 | 区一区二区三视频日韩 | 九色精品高清在线播放 | 亚洲欧美日韩精品永久在线 | 91精品啪在线观看国产老人令品 | aaaa级少| 欧美mv | 亚洲欧美日韩国产精品一区第一页 | 亚洲欧美日韩国产综合久 | 欧美三级韩国三级日本三斤 | 成人精品一区二区户外 | 欧美又粗又 | 日韩新片| 国产精品秘入口免 | 欧美ay亚洲ay日韩 | 国产免费一区 | 日本最新伦中文字幕 | 国产精品不卡在线观看 | 亚洲欧美综合在线精品 | 亚洲国产欧美在线人网站 | 欧美伊人网91 |