用VBS解压缩ZIP文件

2015-07-13 0 576
用VBS解压缩ZIP文件
Sub UnZip(ByVal myZipFile, ByVal myTargetDir)
    If NOT fso.FolderExists(myTargetDir) Then
        fso.CreateFolder(myTargetDir)
    End If
    Set objSource = objShell.NameSpace(myZipFile)
    Set objFolderItem = objSource.Items()
    Set objTarget = objShell.NameSpace(myTargetDir)
    objTarget.CopyHere objFolderItem, 256
End Sub

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim objShell,objFolder
Set objShell=CreateObject("Shell.Application")
Set objFolder=objShell.BrowerFolder(0,"choose folder",0,0)
If not objFolder is Nothing then
Unzip "C:\1.zip",objFolder.self.path
End If
Set objFolder=Nothing
Set objShell=Nothing
Set fso=Nothing

遇见资源网 ASP/Basic 用VBS解压缩ZIP文件 http://www.ox520.com/13499.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务