|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
Batch renaming of files
Okay here is the scoop. I have about 475 images, for some reason they are in the .jpeg format. I need to convert all the files over to a .jpg. Some of the images are .JPEG (caps). Others are lowercase. So I have file 1.JPEG, 2.jpeg, 3.jpeg that I need to convert to 1.jpg, 2.jpg, 3.jpg, etc.
Any ideas?
__________________
Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar 1999
Posts: 355
|
try using the rename command:
man rename but, be warned, it will clobber any files that already exist. otherwise, you could write a little shell script to make mv a little smarter. |
|
|
|
|
|
#3 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
WLSB, glad to have you back around here. I really didn't intend on getting into a fracas with you on our last meeting here. So anyway if I have offended you forgive me.
I have not really played with the rename command before. It may be a moot point anyway but it is something fun to play with. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 1999
Posts: 355
|
it was blown out of proportion.
the usage of rename would be something like: rename .jpeg .jpg *.jpeg which works out to rename < pattern you want to change > < pattern you want to change to > < files you want to change > |
|
|
|
|
|
#5 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
Mairving, Shell scripts are pretty easy to make or use Perl, here's an example I found.. which you can modify as u please.
http://www.tek-tips.com/gviewthread....d/80/qid/84527 or if thats complicated some apps like: http://alfalinux.sourceforge.net/mrename.php3 HTH |
|
|
|
|
|
#6 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
Statica, thanks. I have done some pretty simple shell scripts before.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|