Usenet File Renamer
If you download files using Usenet, and use an indexing service such as newzbin, you probably end up with a bunch of folders for each download which have the message id's prepended to them (for example, 'msgid_2506856_Abdominal_-_Escape_from_the_Pigeon_Hole_(2007)'). It's annoying, but here's a little Perl script which'll rename the folders for you with a fully cleaned up name:
#!/usr/local/bin/perl
opendir(DIRHANDLE, ".") || die "Cannot opendir directory: $!";
foreach $folder (sort readdir(DIRHANDLE))
{
if($folder =~ m/msgid_(d+)_(.+)/)
{
$new_folder = $2;
$new_folder =~ s/_/ /g;
rename($folder, $new_folder);
print "Renaming folder: $new_folder";
}
}
closedir(DIRHANDLE);
It'll take the above example and rename it to 'Abdominal - Escape From the Pigeon Hole (2007)' - much better. Feel free to download the usenet renamer, adapt it, and redistribute it!
Comments about 'Usenet File Renamer'
There are currently no comments on this post - why not add one?