Zip it. Zip it good.
March 27, 2010 9:45 AM   Subscribe

How can I automatically and simultaneously create multiple .ZIP files out of an equal number of uniquely named folders in a common directory?

I have several thousand folders all containing different files (images). They all exist in the same directory and have unique names. I need to make a ZIP file of each folder and give it the same name as the folder.

I currently use WINRAR and it works great when you need to do low quantities of zips, one at a time, but there must be an automatic solution out there to batch this.

I currently have:
/albums/album0001/multiplefiles.xyz
/albums/album0002/multiplefiles.xyz
/albums/album0003/multiplefiles.xyz
...
/albums/album2999/multiplefiles.xyz
/albums/album3000/multiplefiles.xyz

I need:
/albums/album0001.zip
/albums/album0002.zip
/albums/album0003.zip
...
/albums/album2999.zip
/albums/album3000.zip


Thanks in advance!
posted by sandra_s to Computers & Internet (9 answers total)
 
I use Directory Opus for stuff like this. Evaluation is free for 60 days at GPSoft.
This tutorial will tell you how.
posted by Akke at 10:07 AM on March 27, 2010


If you do not have them, get zip.exe and unzip.exe (command-line zip & unzip) at a google near you.
Then start a command prompt, and run:

cd /albums
for /D %a in (*) do zip -r %~na.zip %a

If you want to use a batch file, the %'s must be doubled
In xx.bat:

cd /albums
for /D %%a in (*) do zip -r %%~na.zip %%a

because a batch file eats %s

Type 'help for' at a command prompt if you want to know what /D and %~n do.
posted by hexatron at 10:26 AM on March 27, 2010


Response by poster: hmmmm. Akke, if it worked, you would have the best answer.

I downloaded the software and installed it. Unfortunately, the menus do not match the tutorial you linked, and even a search of the "help" index finds no reference to the function in the tutorial, namely "create multiple zips" anywhere in the software :-( What am I doing wrong?
posted by sandra_s at 10:56 AM on March 27, 2010


Response by poster: Akke, the version I downloaded was 9.5. There is no option to download an earlier version
posted by sandra_s at 11:04 AM on March 27, 2010


Response by poster: Hexatron: I am running Vista 64, all I can fin are 32 bit versions which Vista wont let me install :-(
posted by sandra_s at 11:09 AM on March 27, 2010


You should be able to run 32bit programs in the 64bit Vista cmd
I don't have a 64bit system, but I found this:
http://www.tipandtrick.net/2008/how-to-open-and-run-32-bit-command-prompt-in-64-bit-x64-windows/
which, if the title isn't a total lie, should tell you how to do it.
posted by hexatron at 11:47 AM on March 27, 2010


Best answer: Right click the button bar.
Click customize.
Right click the button bar again.
Click New Button.
Right click the new button.
Click Advanced...
Paste the following:

Copy ZIP=single HERE
@NODESELECT

Click ok and open all config windows.

From now on you should be able to select any number of dirs or files and pack them using the button.
posted by Akke at 1:01 PM on March 27, 2010


...close all config windows...
posted by Akke at 1:02 PM on March 27, 2010


Response by poster: You ROCK, Akke!!!
posted by sandra_s at 1:17 PM on March 27, 2010


« Older Recommendations for a toddler bed please.   |   How does reflexology on feet really work? Newer »
This thread is closed to new comments.