Bulk unrar script – perfect for rapidshare users


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

Advertisements
1 comment
  1. ApOgEE said:

    hi, thanks for commenting my blog. nice script too!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: