How to mass rename files in linux? Please help
OK lets say I have a folder with 500 JPG images and I want to mass rename them all.
they are all ending with *.jpg extension. Lets say I want the files to have the word "mydomain.com" in it. like mydomain.com - anything bla bla.jpg mydomain.com - anything bla bla 1.jpg mydomain.com - anything bla bla 2.jpg mydomain.com - anything bla bla 3.jpg and so on... What will the command be? can someone give an example please. |
a google search for "linux mass rename" came up with some answers :)
|
I did google but could not find any answer that would help me exaclty with my situation.
|
You can try the rename command, but depending on the distribution you're running on, it can be a different version with a different behavior. However a simple method can be:
Code:
for file in *.jpg |
Hi,
I am using CentOS. That command did not work. Any other way out? |
Quote:
|
There is also a rename command, e.g.:
Code:
rename "" "mydomain.com - " *.jpg |
I think there's something that's part of XFCE4 I used EXACTLY for this. It's somewhat easy to use, and has a GUI :) It's got something to do with Thunar, I'm pretty sure. Anyway, it should be part of the CentOS XFCE package, I'll try to figure it out. If you don't mind downloading a whole new desktop environment, (:P Sorry) that might well be the way to go. In the meantime, I'll try to figure out what the name is so you can install just the renamer.
|
All times are GMT -5. The time now is 12:07 PM. |