Zipping A Bunch Of Roms Into Individual Zips


simonb

Member
Joined
Nov 6, 2007
Messages
141
This isn't so much a question as a statement... I've been having issues zipping a bunch of bin files named like:

foo blah 1234 (E) [!].bin
blah foo 4321 (U) (Jun 1992) [b1].bin
4321 foo blah (UEJ) [!].bin
...

and trying to simply zip them up was proving annoyingly tricky. Under linux, or anything else with a bash shell and zip, the following works:

CODE
for i in ./*; do
zip -9 -v "$i.zip" "$i";
done


Figured this may help someone who was after doing the same thing, or me when I come to need to do it again ;-)
 
Under Windows, I just use Total Commander, File -> Pack, and click the option "One archive per file" :)
 
I needed to do the same thing - I tried a bash script under MSYS but failed miserably, so I went with WinRAR's "place all files in septerate archives" option.



Good to know though, as I didn't want to install WinRAR to do it again.

Thanks!
 
Did you try, "help for"? DOS shell is not completely void of power and grace. For instance here's a scrap out of the ancient files where I had no grep so I faked it with a for loop:

for /F "tokens=1,2,3,* delims== " %%1 in (d:\batch\bin\batch.ini) do if /i %%1 EQU LOGID set user=%%2

don't hate the hammer when you can't hit the nail.
 
Well just grab a copy of winrar run it in wine (it runs fine) and goto advanced tab and click zip each file in a separate archive.

It'll name them the same as the original apart from the .zip bit.

EDIT:- didnt see Lineus's reply, great minds think alike :)
 
Back
Top