Matt Cauthorn writes ..
>A friend of mine just had a drive crash on him. He was able to save
>some of the files in dos, as his win98 couln't boot. Now all of his
>mp3s have the dos 8 character limit on them, but winamp in his new
>win98 can actually read the long version of the name on 80% of them.
>
>This tells me there must be a way to write a script that will read the
>long file name and re-name it using VFAT or whatever win file system
>type supports long file names. There are simply too many of them to
>just rename by hand! Any ideas or modules you can suggest?
MP3s have special information stored in the file (called a ID3 Tag) this can
store (amongst other things) something that might look like the long
filename of an MP3
but files other than MP3 have no such information built into them .. Win98
stores that long filename information elsewhere .. so if the files have gone
via DOS - then the long filename information is lost forever
if you want to rename just the MP3s then take a look at CPAN for MP3::Info
and you'll also want to use the File::Find module (it's part of the core
distribution) to drill down through the directories
references:
http://search.cpan.org/search?dist=MP3-Info
perldoc File::Find
perldoc -f rename
--
jason king
By South Carolina state law, if a man promises to marry an unmarried
woman, the marriage must take place. - http://dumblaws.com/