Archive

Daily Archives: 31/07/2009

I just threw together a quick shell script to automate the process of unraring multiple rars.

enter a directory containing rars to be extracted, a password if required, and just walk away =)

enter a directory containing rars to be extracted, a password if required, and just walk away =)

The script searches for all .rar files within a user specified directory and then one by one applies an unrar command to each. The script will work for passworded archives too, or if they have different passwords, enter one at a time

Currently split archives are not supported by this script, so be warned.

If you use a lot of rar files, or are a rapidshare user, take a look and try it for your self

echo "Enter path of dir which contains rar files for extraction"
read thedir

echo "The script will now attempt to extract the following files"
ls $thedir
echo "if these files are password protected, enter password now... (if not, type 0)"
read $rarpass

if [ "$rarpass" == 0 ]; then

	for f in "$thedir/*.rar"; do
			
			unrar e -v $f
	done
	

else

	for f in "$thedir/*.rar"; do
	
			unrar -prarpass e -v $f
	done
fi

Follow

Get every new post delivered to your Inbox.