LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2009, 02:10 PM   #1
Viablade
LQ Newbie
 
Registered: Sep 2008
Posts: 9

Rep: Reputation: 0
Renaming Multiple files


Hi,

I am trying to rename multiple jpeg files. I would like to have the new files renamed with a trailing digit and change the extension to .jpg

011.JPG -> img011.jpg
012.JPG -> img011.jpg

In some cases I already have img in the file name but it has .JPG as the extension. I need to have the extension changed to lowercase (.jpg)

ex. img012.JPG should change to img012.jpg

I am using RHEL 5.

Any help will be appreciated.

Thanks.

Last edited by Viablade; 02-11-2009 at 02:50 PM. Reason: added distro
 
Old 02-11-2009, 02:47 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Try a
man rename

Depending on the distro you're using you may have either an elf-executable
or a perl-script by that name, each of which work slightly differently.

And if you had your distro in either your profile, or your thread, you might
get more targeted responses ;}


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
renaming multiple files linuxhippy Slackware 10 01-21-2011 02:53 AM
Renaming multiple files Changes Linux - Newbie 1 02-01-2009 10:58 PM
renaming multiple files yanchina12 Linux - Newbie 5 12-21-2007 08:56 AM
Renaming multiple files ajcns Linux - Newbie 2 01-20-2007 12:04 AM
Renaming multiple files with the same format Shr00mBoXx Slackware 7 06-20-2004 08:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration