Hello folks, so this has been driving me crazy for a while. most torrents i download these days are rar'ed. about half the people use the part[##].rar format, the other half use the .r[##]. i download lots of stuff all at once, and then giving the rar e command to each job is tedious, especially when youre looking at a boxset or something with lots of subdirectories all with their own rar sets. so i wrote this script, but it doesnt work. the problem creeps up when either the source or dest has a space in the path. i guess i need to replaces spaces with "\ " but i havent figured out how to do that successfully. please help!

thanks!

this finds the first rar file in each subdirectory and explodes it to your destination directory

i did this because i wanted to make sure there were 2 arguments, is that not necessary you think?

Quote:

rars as you wrote it is not an array, ${rar[0]} is first element of an array, an array with only one element is of no use.

well, except that it is an array... i only want One and exactly One file named *.rar from each folder, and i only want to explode the first one; because, as i mentioned above, sometimes the files are named likebigfile.part01.rarbigfile.part02.rarbigfile.part03.rarbigfile.part04.rarbigfile.part05.rarand i only want to explode one of them. so i took the output of ls filtered for *rar into an array and took just the first element. theres probably a better way to do this....

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum