CAPFIX
TAG_ADS
#!/usr/bin/perl -w
use strict;
use Text::Capitalize;
####################################################################
# CAPFIX - A utility to fix capitalization of MP3 files.
# Copyleft 2005 - Nathan E. Pralle
#
# DESCRIPTION: I wrote this to recap, properly, the filenames of MP3 files.
# It takes the filename and nicely recaps it in proper format.
#
# SYNTAX: This utility requires a piped listing of files to it.
# IE: ls *.mp3 | perl capfix
# This utility cannot handle full pathnames (yet, sorry)
#
# REQUIRED: Text::Capitalize module
# This expects filenames to be in the format:
# ARTIST - TITLE.mp3 or TITLE - ARTIST.mp3
#
# CONTACT: Questions, comments, etc.
# http://www.nathanpralle.com/contact.html
####################################################################
my $O;
my $N;
foreach $O(@ARGV){
my($artist,$song)=split(/\s*-\s*/,$O,2);
if(defined $artist && defined $song){
$N=capitalize_title($artist)." - ".capitalize_title($song);
$N=~s/\.mp3/\.mp3/gi;
rename($O,$N);
print "Renaming $O to $N...\n";
}
}
print "Done with rename.\n";
exit;
This page and all content (C)2002-2004 Nathan E. Pralle.
www.nathanpralle.com
Unauthorized distribution is prohibited except with written permission of the author.