Can "UNZIP" be run from a DOS batch (.bat) file?

DLYoung70
DLYoung70 used Ask the Experts™
on
All,

I'm trying to unzip a file by executing the UNZIP utility from a batch file, and it's not working.  Is there any way to make it happen?  I cannot use another utility like pkunzip, as I'm limited by what my company will install as standard on it's servers.  So it's UNZIP or nothing at all.  Help!

My current batch file reads like this:

@echo off
d:
cd epw\resource-in
unzip *.zip

Simply put, I change to the "D:" drive, move to the "epw\resource-in" folder, and I want to unzip all the zip files that are currently in the folder.  But nothing happens.

When I execute these exact instructions from a DOS command prompt, it works.  But when I stick them inside a bat file, nothing happens.  Can anyone provide a solution?

Darrell Young
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Ok, first you need to know why it is not working.  When you do a batch file you might not be seeing the result (esp if you run from Windows).  Put a PAUSE command as your last command in the batch file.  This will force the batch file to ask for key input before going to the next line in the batch command (and keep the info up on the screen for you to read).  

After you modify the batch file, run it again and send me a screen shot of the error message.  More than likely it will be a file not found or something which will easily help us solve your problem.

Make sure that unzip.exe (or unzip.com) is either in your path or in the directory with the files you are trying to unzip.

Regards,
Shannon

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial