Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Unzip File on target server

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

So Contents of 1234.zip 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
  • 2
LVL 18

Expert Comment

ID: 22871299
LVL 38

Expert Comment

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

Author Comment

ID: 22875667
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

Shift-3 earned 2000 total points
ID: 22876491
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 http://www.robvanderwoude.com/vbstech_files_zip.html
strZip = "c:\files\1234.zip"
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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

577 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