看板 Visual_Basic 關於我們 聯絡資訊
小弟有在網路上找到一段code 可以解壓縮.zip格式 但是無法解壓縮到.gz格式 錯誤在oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items 這行程式 弄了好久 實在弄不出來 請各位先進幫幫忙 指點一下小弟 Sub Unzip1() Dim FSO As Object Dim oApp As Object Dim Fname As Variant Dim FileNameFolder As Variant Dim DefPath As String Dim strDate As String Fname = "D:\xampp-win32-1.8.1-VC9.zip" If Not (Fname = False) Then DefPath = "D:\" If Right(DefPath, 1) <> "\" Then DefPath = DefPath & "\" End If strDate = Format(Now, " dd-mm-yy h-mm-ss") FileNameFolder = DefPath & "MyUnzipFolder " & strDate & "\" MkDir FileNameFolder Set oApp = CreateObject("Shell.Application") oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items On Error Resume Next Set FSO = CreateObject("scripting.filesystemobject") FSO.deletefolder Environ("Temp") & "\Temporary Directory*", True End If End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 180.177.13.161
MOONRAKER:抓gzip來裝再用shell()執行不就解開了 11/17 00:28