Unzip File on target server

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?
sunilbainsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sk_raja_rajaCommented:
0
Shift-3Commented:
You can do this with native vbscript using the last script on this page:
http://www.robvanderwoude.com/vbstech_files_zip.html
0
sunilbainsAuthor Commented:
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
Shift-3Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.