Vbscript that automates an unzip operation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rettla
    New Member
    • Jan 2012
    • 28

    Vbscript that automates an unzip operation

    Hi,

    I am working on a project that retrieves a zip file via ftps from a server using an automated script and I wanted to write vbscript script that automates the unzip operation. So far I got this script but it only creates an empty target folder and there are no files. Please help. I have included the zip file i am working with.
    Attached Files
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    You must open a shell and follow the rules for the commandline of the program.

    For Winzip it's= program command ZIPfile Folder
    (command for extract => -e)


    Code:
    'Calling unzip function 
    Set WshShell = WScript.CreateObject("WScript.Shell") 
    WshShell.Run  """C:\Program Files\WinZip\WZUNZIP.EXE""" & " -e " & """E:\xfer4\DDAP.SPRD.JCH.E.zip""" & " " & """E:\xfer4"""
    This will extract all the files from "E:\xfer4\DDAP. SPRD.JCH.E.zip" to the folder "E:\xfer4"

    Comment

    • Rettla
      New Member
      • Jan 2012
      • 28

      #3
      Thanx guido, that reali helped. I appreciate it

      Comment

      Working...