Wednesday, January 25, 2006

Mass par2 repair amazingly simple.

$ echo *.par2

or to get one filename per line :

$ for i in *.par2; do echo $i; done

So to mass-repair everything in a directory simply type :

$ for i in *.par2; do par2repair $i; done


EDIT : only works if the extension in "vol**+**.PAR2" is capitalized :-(

5 comments :

Anonymous said...

I found your info useful and get around the case sensitivity like this.

for i in *.[pP][aA][rR]2; do par2 r $i; done

Hope it helps someone else!

tobi said...

thanks for your comment!

tobi said...

I've updated the FAQ with your comment.

Stefan said...

check out this (complex) shellscript to automate the task:

http://sourceforge.net/projects/altbinrepair/

Anonymous said...

I had spaces in the filenames. This one did the trick for me:
for i in "*.par2"; do par2repair $i; done