It really is a drag when you download full season of your favorite show and see 20+ episodes in separate folders, every episode rared. It takes a bit of time to unpack one by one.
Here’s a little script that should help you with that (and with similar tasks). Download.
Install:
gunzip unrarr.gz sudo cp unrarr /usr/bin/ sudo chmod +x /usr/bin/unrarr
Usage:
unrarr /path/to/folder
Edit:
To check rar files (through svf files) for consistency CVF package must be installed (cfv.sourceforge.net)
September 5th, 2008 at 11:56 am
Thx for the nice lil program, this is for sure a timesaver=)
October 17th, 2008 at 1:39 am
Brilliant tool thank you!
I have an improvement however, currently your script reads
[code]
2)
for f in `find $1 -wholename *.r01`
do
echo "Unpacking in directory: "`dirname $f`
rar e -inul $f `dirname $f`
done ;;
[/code]
This means that some packages cannot be unpacked (e.g. part01.rar – part20.rar).
I could easily solve this by altering your script (instead of -wholename *.r01` I wrote -wholename *.part01.rar`) and saving it as unrarr2.
This is however not the prettiest solution.
Maybe you could add another IF – THEN line under 2?
2a IF -wholename *.r01` THEN unpack
2b IF -wholename *.part01.rar’ THEN unpack
I would do it myself if I could but I know nothing of scripting, I only have a basic knowledge of logics.
January 19th, 2009 at 2:20 am
you can give several suffixes to find :
for f in `find $1 -path *.r01 -or -path *.part01.rar -or -path *.part1.rar
to fix problem with files with spaces :
for f in `find $1 -path *.r01 -or -path *.part01.rar -or -path *.part1.rar | sed -e ’s/ /[SPACE]/g’`
then unescape files with :
f=`echo $f | sed -e ’s/\[SPACE\]/ /g’`
complete loop :
for f in `find $1 -path *.r01 -or -path *.part01.rar -or -path *.part1.rar | sed -e ’s/ /[SPACE]/g’`
do
f=`echo $f | sed -e ’s/\[SPACE\]/ /g’`
echo $f
echo `dirname “$f”`
unrar e -inul “$f” `dirname “$f”`
done
June 23rd, 2009 at 9:26 pm
Maybe it’s because I’m working with books instead, but this script didn’t work for me.
I downloaded a lot of RARed public domain books and plays and so now I have a huge number of folders with Chekov, Shakespeare, Shaw, etc.
When I’m at the top folder for all the authors, this script doesn’t work, but it also doesn’t work when I’m in an individual author’s folder (say, Shakespeare with Shakespeare1.rar Shakespeare2.rar, etc).
I receive the following response in Terminal:
1.. Recheck rar (svf check).
2.. Unrar all.
3.. Delete rar and sfv files.
4.. Exit
Select:
I choose option 2 and receive this error:
find: -wholename: unknown option
Then it loops back to the menu choices again.
Any suggestions?
June 23rd, 2009 at 9:26 pm
I should also mention I’ve gone into the individual author directories with the same results.
June 24th, 2009 at 2:04 am
wholename is standard option of find, seems like your find tool doesn’t support it for some reason.
October 6th, 2009 at 10:58 am
Hey Vladimir,
Just wanted to come to say that I still use your script at least three times a week *Two thumbs up*
Grtz,
Robert
PS: Visited Novi-Sad and Belgrade this summer, and I can only say ????? ?? ??????!
PPS: ?????? ?? ?????? ? ???? ????? ??? ??? ????? ;-)
October 6th, 2009 at 10:59 am
Ok Cyrillic is not supported :s
November 22nd, 2009 at 3:39 pm
Could you please post what the script should look like including the .part01.rar variant?
I still use (your) unrarr and the version I changed (unrarr2)
December 29th, 2009 at 7:57 pm
Well, on Mac OS X 10.5.7 find -wholename option does not work, I did not find it in man find.
catohagen’s cycle results in:
sed: 1: “’s/\n”: invalid command code ?
Anyone has it working on a Mac?