How to read the contents of a .zip file with VBScript without actually extracting the files?

前端 未结 4 1898
离开以前
离开以前 2021-01-18 07:36

I have a .zip file that starts with a parent directory. I need to read that dir from the file then search my HD to see if that dir name already exists. If it exists, I then

4条回答
  •  庸人自扰
    2021-01-18 08:22

    You can use For Each on your objSource object, for example:

    Dim objSA, objSource, item
    Set objSA = CreateObject("Shell.Application")
    Set objSource = objSA.NameSpace(pathToZipFile).Items ()
    For Each item in objSource
        WScript.Echo item
    Next 
    

提交回复
热议问题