LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mp3 files - replacing blank spaces with _ script? (https://www.linuxquestions.org/questions/linux-newbie-8/mp3-files-replacing-blank-spaces-with-_-script-123096/)

mymojo 12-05-2003 07:29 PM

mp3 files - replacing blank spaces with _ script?
 
could someone lead me to a script? say they're all under one directory...

to convert "Music - Cool Artist.mp3" to "Music_-_Cool_Artist.mp3"

GT_Onizuka 12-05-2003 08:03 PM

Although I'm not a script guru and alternate solution would be to download an ID3 tag editor called EasyTag it has a way you can change the filename to change all spaces into underscores and various things. It's cool try it out.

ac1980 12-05-2003 08:03 PM

a rough perl script. may have problems with filenames containing special char.
must be run from within the directory:
perl renspaces.pl *

#!/bin/perl
while ($_=$old=shift) {
s/\s/_/g;
rename("$old",$_)
}

slakmagik 12-06-2003 12:54 AM

If you get easyTAG, be sure to get the patches - otherwise, it won't do precisely what you want - spaces to underscores. First time I downloaded it, I missed those and had to recompile. easyTAG's nice but kind of limited. No TagScanner. :(

mymojo 12-08-2003 03:33 AM

thanks guys


All times are GMT -5. The time now is 05:59 PM.