# Help with batch files and unzipping



## DocVonBubbles (Aug 7, 2006)

Hello, I don't know very much about batch itself but a know a bit about computers and web development.

What I want to do is make a batch file (or something like it) that will unzip all the files in a directory and then move all the files with a certain extention to a new directory. Is it possible? Could someone give me some help has to how to go about this? I've tried looking around for tutorials, but the only ones I could find that were close were ones on how to zip files, not unzip them.


----------



## Squashman (Apr 4, 2003)

Well, you will need a command line unzip utility.
http://www.info-zip.org/Zip.html

Then what I think you would want to do is always extract the file to the same directory. Or you could give the batch file two parameters from the command line. The first one would be what zip file to unzip and the second would be where to unzip it too.


----------



## JohnWill (Oct 19, 2002)

You can use the MOVE command to move the specific files.

MOVE *.jpg c:\jpg

That command moves all the JPG files from the current folder to a folder in the root of C: called JPG.


----------



## DocVonBubbles (Aug 7, 2006)

Thank you both! It took me awhile but a figured it out.

Mwahaha! All the zips are now dominated by my iron fist! The only problem is, apparently, they all made a deal with DOS and changed their names in a petty attempt to confuse me. No matter, their names becoming shorter will not help them!

Err... yeah... thanks again...


----------



## JohnWill (Oct 19, 2002)

You should be able to retain the long file names with the current version of InfoZIP. There is also a command line enhancement for WinZIP that will allow batch file use.


----------

