Hmmm ... seems pretty simple ... here's my baby-talk approach: # note: I would tar up your directory b4 running this program, just # in case it doesn't work (not in the mood to test this w/ my mp3's ;)) # backup backup backup! :)
use File::Copy; # first, read in the dir/files opendir (DIR, "/path/to/mp3s"); my @files = readdir(DIR); closedir (DIR); # now go through each file, rename/move to new file # and append change to logfile # opening log file open (LOG, ">>/path/to/logfile"); # set the first number my $filenum = 1; foreach (@files) { my $newfile = "/path/to/newmp3s/" . $filenum++ . ".mp3"; # you may need to preface $_ with the full path, such as # move( "/path/to/mp3s/$_", $newfile ); # you may also want to use copy() instead of move() to test # before actually making the move move( $_, $newfile ); print LOG "$_ -> $newfile\n"; } close (LOG); __END__ Jason If memory serves me right, on Friday 01 February 2002 16:38, Eric Plowe wrote: > I have a directory full of mp3s with various names, but I want to > convert each mp3 to the file name 1.mp3 and continuing up to the last file > in the directory - I would also like it to generate a text file that is > setup like > > <older mp3 file name> -> <new numbered mp3 file name) > > any ideas or suggestions? thanks > > ~Ericv -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]