LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   rename files (https://www.linuxquestions.org/questions/linux-general-1/rename-files-339591/)

allelopath 07-03-2005 09:44 AM

rename files
 
If i have a directory of files, e.g.

tree.jpg
dog.jpg
dog2.jpg
trail.jpg
bigview.jpg

how do i rename them such that each prefix is appended with "-1024", like so:

tree-1024.jpg
dog-1024.jpg
dog2-1024.jpg
trail-1024.jpg
bigview-1024.jpg

I've played with the rename command, but can't come up with anything that works.

Kirmonkey 07-03-2005 09:53 AM

Use,

krename

Application, comes with KDE and may need to be installed

Super useful.

Can be used as a plugin for digicam,

this is super useful too!


The Monkey

allelopath 07-03-2005 10:21 AM

cool, thanks for the tip.
i didn't know about krename.
it works well.

newbie007007 07-04-2005 03:33 PM

Can someone tell me how can we do this using shell script???

Tinkster 07-05-2005 02:22 AM

rename .jpg -1024.jpg *.jpg

No script involved.

newbie007007 07-05-2005 03:00 AM

Great!!!!
Thanks alot.


All times are GMT -5. The time now is 07:09 AM.