Unzip File on target server

Posted on 2008-11-03
Last Modified: 2010-04-16
 I need to write one script which will unzip file using windows inbuild utility on 2003 server.
name is:
I need to unzip file into one folder : D:\abc\dfg\

So Contents of should go to D:\abc\dfg\  
Iam using unzip utility , but it not putting into D:\abc\dfg\    
I cannot user third party tool for unzipping.

Can somebody help?
Question by:sunilbains
    LVL 18

    Expert Comment

    LVL 38

    Expert Comment

    You can do this with native vbscript using the last script on this page:

    Author Comment

    Can you give me the command itself.  Above examples shows third party tool.
    I need to use win2k3 inbuild utility to unzip files on the folder
    LVL 38

    Accepted Solution

    The last script on that page uses native vbscript; no third-party tools are necessary.  Here is a simplified version.

    Paste the script below into a text file with a .vbs extension.  Customize the value of the strZip variable with the location of the zip file.  Running the script will extract the file to the folder defined in strDest.

    'Adapted from
    strZip = "c:\files\"
    strDest = "d:\abc\dfg"
    Set objShell = CreateObject("Shell.Application")
    Set objSource = objShell.NameSpace(strZip).Items()
    Set objTarget = objShell.NameSpace(strDest)
    objTarget.CopyHere objSource

    Open in new window


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    This video discusses moving either the default database or any database to a new volume.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now