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

首頁 > 編程 > ASP > 正文

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

2024-05-04 11:00:36
字體:
來源:轉載
供稿:網友


<%@ 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).
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 嘉善县| 临漳县| 连云港市| 古交市| 谢通门县| 东乌珠穆沁旗| 积石山| 鄄城县| 额济纳旗| 腾冲县| 怀仁县| 色达县| 安平县| 洞头县| 营山县| 霍山县| 凤冈县| 西丰县| 大宁县| 哈密市| 环江| 怀集县| 仙居县| 襄汾县| 鹰潭市| 文登市| 乌兰察布市| 崇礼县| 漳平市| 呈贡县| 临洮县| 蓬溪县| 延边| 黔西| 津市市| 台南市| 株洲市| 高尔夫| 民权县| 冕宁县| 郑州市|