#!/usr/bin/perl -w use strict; use MP3::Tag; use File::Find; print "Pfad angeben wo die MP3's sind!!!\n"; while () { chomp; $_ = <*.mp3>; find(\&wanted, $_);# findet alles was in dem angegebenen Verzeichnis ist } sub wanted { my ($mp3, $track, $artist); return unless /mp3$/i; # alles was keine *.mp3 Endung hat wird nicht beachtet if ($mp3=MP3::Tag->new($_)) { print "$_ (Tags: ", join(", ",$mp3->get_tags),")\n"; my @info=$mp3->autoinfo; print "* Song: $info[0]\n"; print "* Track: $info[1]\n"; print "* Artist: $info[2]\n"; print "* Album: $info[3]\n"; print "* Comment: $info[4]\n"; my @path_opt= ("$track","$artist"); ordner(); } print "\n"; } sub ordner { my $directory = "Ordner"; unless(-e $directory or mkdir $directory) { die "Unable to create $directory\n"; } }