泰安uui 2008-1-25 20:23
常见打包下载的mdb文件解包问题
常见打包下载的mdb文件解包问题
把代码保存为解压.vbs文件 复制内容到剪贴板
代码:
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=[b][color=red]Packet.mdb[/color][/b];"
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)
[url=http://www.xiugoo.com/bbs][color=white]情缘XIUGOO站长之家 网赚联盟 源码技术 [/color][/url]
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
pre8 2008-10-2 22:10
大致看明白了,楼主的思维太过发散、太过跳跃了。楼主,加强集中精力叙述一件事情的能力。不要再发散了
zxlovest 2008-10-10 23:10
高山仰止,莫测高深。。。。
dymdymcom 2008-11-2 00:00
生活就像被人强j, 反抗不了就学会享受