Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

renaming various format image files by picture date

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
aharami



Joined: 12 Aug 2007
Posts: 4

PostPosted: Wed Dec 12, 2007 4:38 am    Post subject: renaming various format image files by picture date Reply with quote

I have pitcures taken from multiple cameras that I want to rename in a single format. To make things clearer, here is a screen shot.
edit. wont let me post screen shot...so here it is in ASCII glory

Filename....................................Picture taken on
IMG_0034_A85.jpg....................7/10/2007 3:42 PM
IMG_0035_A85.jpg....................7/10/2007 5:15 PM
IMG_0003.JPG...........................7/11/2007 8:00 AM
IMG_0036_A85.jpg....................7/11/2007 12:10 PM
DSCF0042.jpg...........................7/12/2007 9:01 AM
IMG_0027.JPG...........................7/12/2007 2:29 PM
IMG_0028.JPG...........................7/12/2007 2:40 PM
DSCF0129.jpg...........................7/13/2007 11:42 AM
DSCF0142.jpg...........................7/13/2007 11:59 AM

These are sorted date picture taken on.

The 'IMG_xxxx_A85.jpg' pics are taken with my Canon A85. The 'IMG_xxxx.JPG' with my Canon S3IS, and the 'DSCFxxxx.jpg' pics with a Fuji F31fd. I'd like to rename them all in one format so that when they are sorted by name, they are also sorted by date picture taken on. But I'd also like to add some sort of indicator at the end of the prefix about which camera it was taken with - such as IMG_0001_cameraname.jpg'

So I'd like these 9 pictures to be named
IMG_0001_A85.JPG
IMG_0002_A85.JPG
IMG_0003_S3.JPG
IMG_0004_A85.JPG
IMG_0005_F31.JPG
IMG_0006_S3.JPG
IMG_0007_S3.JPG
IMG_0008_F31.JPG
IMG_0009_F31.JPG

*note - dont care about changing the extention.
That way, when they are sorted by name, they still remain sorted by date picture taken on.

I cant think of an unified way to do this.
So far, as you can see, Ive already added characters '_A85' at the end of the prefix for pics that were taken with the A85.
Ive been successful in renaming the DSCFxxxx.jpg pics into IMG_xxxx_F31.jpg by the following

DSCF* in the Name Filter to pick up all files that start with DSCF.
1. search - (?Ex) .* # remove all characters in prefix
replace -

2. search - (?Ex)(.*) # add the word: 'myword' to the left in prefix
replace - IMG\1

3. search -
replace - *Insert Counter after*Prefix*

4. search - (?Ex)(.*) # add the word: 'myword' to the right in prefix
replace - \1_F31fd

After this, Im left with

IMG_0034_A85.jpg
IMG_0035_A85.jpg
IMG_0003.JPG
IMG_0036_A85.jpg
IMG_0001_F31fd.jpg
IMG_0027.JPG
IMG_0028.JPG
IMG_0002_F31fd.jpg
IMG_0003_F31fd.jpg

Now it seems like all I have to do is to redo the xxxx counter after IMG_ but cant figure out how to do this.

Any help is appreciated.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Dec 12, 2007 5:55 am    Post subject: Reply with quote

If I understand you correctly, you just want to add the _S3 to the files that don't already have a camera identifier.

Try this (don't include the single quotes):

Row: 1
Search: '(?i)(IMG_[0-9]{4,4})[.]jpg'
Replace: '\1_S3.jpg'


For future jpg's you could actually include processing for the DSCF files at the same time.

Row: 2
Search: '(?i)DSCF([0-9]{4,4})[.]jpg'
Replace: 'IMG_\1_F31.jpg'


Or in future you could put the images for the different cameras in their own folder (e.g. A85 folder for the Canon, F31 for the Fuji, etc.) and then rename the files based on the folder name (using the Folder insertion predefined command). That way your A85 files could be automatically renamed too.

Hope this helps!

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aharami



Joined: 12 Aug 2007
Posts: 4

PostPosted: Wed Dec 12, 2007 6:08 am    Post subject: Reply with quote

Thanks Peter. that is a much simpler method. But there is one more thing that Id like to do - rename the 4-digit counter in the middle of the prefix

I'd like to go from

IMG_0034_A85.jpg
IMG_0035_A85.jpg
IMG_0003.JPG
IMG_0036_A85.jpg
DSCF0042.jpg
IMG_0027.JPG
IMG_0028.JPG
DSCF0129.jpg
DSCF0142.jpg

to

IMG_0001_A85.JPG
IMG_0002_A85.JPG
IMG_0003_S3.JPG
IMG_0004_A85.JPG
IMG_0005_F31.JPG
IMG_0006_S3.JPG
IMG_0007_S3.JPG
IMG_0008_F31.JPG
IMG_0009_F31.JPG
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Dec 12, 2007 7:54 am    Post subject: Reply with quote

Add these 3 rows (the easiest way to add the rows is to use the mouse to block copy below from the Row 3 line to the last Replace line, then go to the main window in PFrank, click anywhere on the custom list, and press ctl-F2; that will insert the 3 rows from below to the top of the list. Then move the 3 rows down below your original 2 rows by using the down-arrow button of the custom renaming panel).

Row: 3
Search: 'IMG_[0-9]{4,4}'
Replace:
Row: 4
Search:
Replace: '*Insert Counter before*Prefix*'
Row: 5
Search: '(.*)'
Replace: 'IMG_\1'

Before you press the scan button you need to go to the options window and configure the 'counter insertion' parameters. i.e. min 4 digits, leading zeros, and a null separator.

Pressing 'scan' will result in a preview window showing the old numbers removed and new ones inserted.
But the order will not be what you want. You then have to resort the preview list based on the 'image date/time' column and then press the rescan button on the preview page. This should give you the correct numbering.
There are other columns available that show data like date/time original, or date/time digitized; if you want to sort by that kind of data then these columns would have to be enabled using the options window.

That's probably more information than you wanted but I thought it might be useful in case you want to try experimenting Wink

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aharami



Joined: 12 Aug 2007
Posts: 4

PostPosted: Thu Dec 13, 2007 5:30 am    Post subject: Reply with quote

awesome that worked. It was leaving an extra underscore before the camera identifier (making the names IMG_0001__S3.jpg) so I added one more line to it to remove extra underscores.

Final custom renaming list stands at
Row 1
search - '(?i)(IMG_[0-9]{4,4})[.]jpg'
replace - '\1_S3.jpg'

Row 2
search - '(?i)DSCF([0-9]{4,4})[.]jpg'
replace - 'IMG_\1_F31.jpg'

Row 3
search - 'IMG_[0-9]{4,4}'
replace - ' '

Row 4
search - ' '
replace - '*Insert Counter before*Prefix*'

Row 5
search - '(.*)'
replace - 'IMG_\1'

Row 6
search - '(?Ex) [\_]+ # replace duplicate '_' with single '_' in prefix'
replace - '_'


Now I can do everything in one step! Thanks a lot Peter! For your help as well as this awesome program!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com