You can also use tagged.

Here a simple mp3 command line renamer that use File::Find to traverse the given directory structure:
use strict; use File::Find; use MP3::Tag; my $dir=$ARGV[0]; die "use mp3ren.pl directory_name" if (!$dir); find (\&wanted, "$dir"); sub wanted { if (&match("$File::Find::name")) { &rename_MP3($File::Find::name); } } sub match { my $filename=$_[0]; if (-d $filename) { return 0; } my $mp3 = MP3::Tag->new($filename); if (defined $mp3) { $mp3->get_tags; if (exists $mp3->{ID3v1}) { return 1; } else { print "$filename is not mp3 or no ID3v1 tag\n"; return 0; } } } sub rename_MP3 { my $fullname_mp3=$_[0]; my $mp3 = MP3::Tag->new($fullname_mp3); my $new_mp3_name; $mp3->get_tags; my $song=$mp3->{ID3v1}->song; my $artist=$mp3->{ID3v1}->artist; if ($artist && $song) { $new_mp3_name="$artist--$song"; } elsif ($song) { $new_mp3_name="$song"; } elsif ($artist) { $new_mp3_name="$artist--untitled"; } else { $new_mp3_name=""; } if ($new_mp3_name) { $new_mp3_name=~s#[\\|\?|\*|\||\:|"|<|>|/]+##g; $new_mp3_name.=".mp3"; $new_mp3_name="$File::Find::dir/$new_mp3_name"; if ($fullname_mp3 eq $new_mp3_name) { print "Error renaming $fullname_mp3 to $new_mp3_name: same nam +e\n" } elsif (!rename("$fullname_mp3","$new_mp3_name")) { print "Error renaming $fullname_mp3 to $new_mp3_name: $!\n" } else { print "Renamed $fullname_mp3 to $new_mp3_name\n" } } else { print "Error renaming $fullname_mp3: no ID3v1 tag\n" } }

In reply to Re: title/artist info by dree
in thread title/artist info by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.