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

首頁 > 編程 > ASP > 正文

不用WinRar只有asp將網絡空間上的文件打包下載

2024-05-04 10:57:19
字體:
來源:轉載
供稿:網友


<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include file="asptar.asp"-->
<%
Response.Buffer = True
Response.Clear
Dim Co,Temp,T,x,i,fsoBrowse,theFolder,TheSubFolders,FilePath,s,PH,objTar
Co=0
PH="./UpFile" '文件路徑 '壓縮Upfile下的所有文件
   Set objTar = New Tarball
   objTar.TarFilename="LvBBS_UpdateFile.rar"  '打包的名稱
   objTar.Path=PH
   set fsoBrowse=CreateObject("Scripting.FileSystemObject")
   Set theFolder=fsoBrowse.GetFolder(Server.Mappath(PH))
   Set theSubFolders=theFolder.SubFolders
   For Each T in theFolder.Files
      Temp= Temp & T.Name & "|"
      Co=Co+1
   Next
   For Each x In theSubFolders
      For Each i In X.Files
         Temp= Temp &  X.Name&"/"&i.Name&"|"
         Co=Co+1
      Next
   Next
   If Co<1 Then
      Response.Write "暫時沒有可更新的文件下載"
   'objTar.AddMemoryFile "Sorry.txt","Not File!"
   Else
      Temp=Left(Temp,Len(Temp)-1)
      FilePath=Split(Temp,"|")
      For s=0 To Ubound(FilePath)
        objTar.AddFile Server.Mappath(PH&"/"&FilePath(s))
      Next
   If Response.IsClientConnected Then
        objTar.WriteTar
        Response.Flush
   End If
   End If
   Set ObjTar = Nothing
   Set fsoBrowse= Nothing
   Set theFolder = Nothing
   Set theSubFolders = Nothing

%>

asptar.asp

<%
' UNIX Tarball creator
' ====================
' Author: Chris Read
' Version: 1.0.1
' ====================
'
' This class provides the ability to archive multiple files together into a single
' distributable file called a tarball (The TAR actually stands for Tape ARchive).
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 常熟市| 宁陕县| 亚东县| 荥经县| 得荣县| 开化县| 文水县| 托克托县| 栾城县| 长乐市| 太保市| 开阳县| 渝北区| 抚远县| 普定县| 平顺县| 汽车| 交城县| 昌都县| 界首市| 韶关市| 什邡市| 门头沟区| 汉源县| 齐河县| 永吉县| 禹城市| 孟州市| 含山县| 郎溪县| 岐山县| 内乡县| 睢宁县| 汾西县| 无棣县| 伊川县| 探索| 灵川县| 房产| 龙州县| 鞍山市|