ariz, how do you do it using bash???
--- Ariz Jacinto <[EMAIL PROTECTED]> wrote:
> you can do that in perl, bash, etc, but here's a
> quick and dirty using php
>
>
> mp3_rename.php
> ------------------ cut the code here
> -------------------------
>
> <?php
>
> $handle=opendir('/home/gbriones/mp3');
>
> while (false!==($file = readdir($handle)))
> {
> if ($file != "." && $file != "..")
> {
> $newfile = str_replace("%20", " ", $file);
> if(rename ($file, $newfile))
> echo "$file renamed to $newfile...\n";
> }
> }
>
> closedir($handle);
> ?>
>
> ------------------ cut the code here
> -------------------------
>
>
> at the shell prompt type
>
> shell> php /file_path/mp3_rename.php
>
>
> * you must have php installed
>
>
> HTH
>
> maligayang pasko!!!
>
> (bored tech guy)
>
>
>
>
> Gabriel L. Briones III wrote:
>
> >Hello Plugers,
> >
> >I have lot's of mp3 files that has this format
> >
> > Mr.%20Big%20-%20Just%20Take%20My%20Heart.mp3
> >
> >
> >what I did to rename this file in a more readable
> form is this
> >
> > $ mv
> Mr.%20Big%20-%20Just%20Take%20My%20Heart.mp3 "Mr.
> Big - Just Take My
> >Heart.mp3"
> >
> >But you dont want to do that if you have thousands
> of files.
> >
> >I know that a script can do this but I don't know
> how to do it.
> >Can somebody please enlighten me on this?
> >
> >
>
> _
> Philippine Linux Users Group. Web site and archives
> at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to
> [EMAIL PROTECTED]
>
> Fully Searchable Archives With Friendly Web
> Interface at http://marc.free.net.ph
>
> To subscribe to the Linux Newbies' List: send
> "subscribe" in the body to
[EMAIL PROTECTED]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]