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

x
?
Solved

Unzip File on target server

Posted on 2008-11-03
4
Medium Priority
?
224 Views
Last Modified: 2010-04-16
All,
 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?
0
Comment
Question by:sunilbains
  • 2
4 Comments
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22871299
0
 
LVL 38

Expert Comment

by:Shift-3
ID: 22871473
You can do this with native vbscript using the last script on this page:
http://www.robvanderwoude.com/vbstech_files_zip.html
0
 

Author Comment

by:sunilbains
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
0
 
LVL 38

Accepted Solution

by:
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

0

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