Showing posts with label VB 解壓程式設計 學習 VB 軟體設計 吳清輝老師 湜憶電腦 線上教學. Show all posts
Showing posts with label VB 解壓程式設計 學習 VB 軟體設計 吳清輝老師 湜憶電腦 線上教學. Show all posts

Saturday, June 13, 2009

在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

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

在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

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