主页 > 知识库 > unpack.vbs

unpack.vbs

热门标签:高德百度地图标注推广 为什么申请400电话 京东办理400电话查询 外呼系统解决电销问题 菏泽电销外呼系统软件 南阳高频外呼系统怎么安装 地图标注店铺的收费 贵阳电话外呼系统厂家 苏丹地图标注app

Dim rs, ws, fso, conn, stream, connStr, theFolder
Set rs = CreateObject("ADODB.RecordSet")
Set stream = CreateObject("ADODB.Stream")
Set conn = CreateObject("ADODB.Connection")
Set fso = CreateObject("Scripting.FileSystemObject")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HYTop.mdb;"

conn.Open connStr
rs.Open "FileData", conn, 1, 1
stream.Open
stream.Type = 1

On Error Resume Next

Do Until rs.Eof
 theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
 If fso.FolderExists(theFolder) = False Then
  createFolder(theFolder)
 End If
 stream.SetEos()
 stream.Write rs("fileContent")
 stream.SaveToFile str rs("thePath"), 2
 rs.MoveNext
Loop

rs.Close
conn.Close
stream.Close
Set ws = Nothing
Set rs = Nothing
Set stream = Nothing
Set conn = Nothing

Wscript.Echo "所有文件释放完毕!"

Sub createFolder(thePath)
 Dim i
 i = Instr(thePath, "\")
 Do While i > 0
  If fso.FolderExists(Left(thePath, i)) = False Then
   fso.CreateFolder(Left(thePath, i - 1))
  End If
  If InStr(Mid(thePath, i + 1), "\") Then
   i = i + Instr(Mid(thePath, i + 1), "\")
   Else
   i = 0
  End If
 Loop
End Sub

标签:通辽 海北 资阳 沧州 咸宁 韶关 阿里 昌都

巨人网络通讯声明:本文标题《unpack.vbs》,本文关键词  unpack.vbs,unpack.vbs,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《unpack.vbs》相关的同类信息!
  • 本页收集关于unpack.vbs的相关信息资讯供网民参考!
  • 推荐文章