顯示具有 VB 解壓程式設計 學習 VB 軟體設計 吳清輝老師 湜憶電腦 線上教學 標籤的文章。 顯示所有文章
顯示具有 VB 解壓程式設計 學習 VB 軟體設計 吳清輝老師 湜憶電腦 線上教學 標籤的文章。 顯示所有文章

2009年6月13日 星期六

在VB中解壓縮備份的方法

在VB中解壓縮備份的方法
Function fUnzip(sZipFile, sTargetFolder)
Dim oShellApp: Set oShellApp = CreateObject("Shell.Application")
Dim oFSO: Set oFSO = CreateObject("Scripting.FileSystemObject")
'1.如果資料夾不存在則增之
If Not oFSO.FolderExists(sTargetFolder) Then oFSO.CreateFolder
sTargetFolder
'2.將解壓縮的檔案存到資料夾中
oShellApp.NameSpace(sTargetFolder).CopyHere
oShellApp.NameSpace(sZipFile).Items
Do
WScript.Sleep 1000
Loop While oFSO.GetFolder(sTargetFolder).Files.Count < oShellApp.NameSpace(sZipFile).Items.Count End Function

更多影音教學與討論,請上[溫馨論壇]