LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to rename muliple files (https://www.linuxquestions.org/questions/linux-general-1/how-to-rename-muliple-files-446853/)

manishsingh4u 05-20-2006 07:53 PM

how to rename muliple files
 
Hello Friends,
I have used rename command many times with Fedora Core but, the same is not working with Ubuntu 5.10. suppose, if I wish to change all files with "dll" extension to "mp3", I could use
Code:

rename .dll .mp3 *.dll
But, this doesn't work with Ubuntu.
Code:

root@Manish:/var/www/fc# rename .dll .mp3 *.dll
syntax error at (eval 1) line 1, near "."
root@Manish:/var/www/fc#

OR
Code:

root@Manish:/var/www/fc# rename dll mp3 *.dll
Bareword "dll" not allowed while "strict subs" in use at (eval 1) line 1.
root@Manish:/var/www/fc#

So, how do I rename my files now?

Linux.tar.gz 05-20-2006 09:12 PM

Try krename:
http://www.krename.net/

manishsingh4u 05-21-2006 05:27 AM

Quote:

Originally Posted by Linux.tar.gz

Thanks. krename is good.

whansard 05-21-2006 06:17 AM

in ubuntu, rename is a perl script called prename. get the real rename.

manishsingh4u 05-21-2006 06:35 AM

So, how to get the orginal rename command?

whansard 05-21-2006 06:56 AM

it's part of util-linux. maybe compile the package, then just copy rename into /usr/bin

ftp://ftp.kernel.org/pub/linux/utils/util-linux/

manishsingh4u 05-21-2006 07:59 AM

Quote:

Originally Posted by whansard
it's part of util-linux. maybe compile the package, then just copy rename into /usr/bin

Oh thanks :)


All times are GMT -5. The time now is 01:48 PM.