Renaming with multiple extensions and sequential numbers

During photo editing, a working file is created for each image. this file contains my editing sequences. i wish to rename it along with the original file once all is done.

Ex:

filename1234.cr2
filename1234.cr2.dop
filename4321.cr2
filename4321.cr2.dop

I wish it to be

exifdate001.cr2
exifdate001.cr2.dop
exifdate002.cr2
exifdate002.cr2.dop

I managed to figure out most of the expressions to get this to work, but I end up with

exifdate001.cr2
exifdate002.cr2.dop
exifdate003.cr2
exifdate004.cr2.dop

I am using the rename window

old name: ([^.]+).?(.*)
new name: {date|D#yyyy-MM-dd}_[#].\2

  • I have the sequential numbering from 001 by 1 enabled.
  • I tried to enable rename matching filenames as one as well

Is it possible to do?

Thanks

Is it possible to do?

Yes.


A linked account is good forum etiquette.

Should be possible to do, after 15 years on the forum, 150 posts, and at least one friendly reminder, don't you think?

done

1 Like

This will work when you temporarily rename the .cr.dop extensions to .dop or something similar.

right, but is there a way to do it in one step? so I don't have to rename the .cr2.dop to .dop ... then rename them all back to cr2.dop after?

I realize now that the .cr2.dop files wont have EXIF data... So i can manually put in a date instead, but would be nice if i can rename the 2 files together at once versus having to do 3 different renames

  1. rename .cr2.dop to .dop
  2. rename both files at once
  3. rename .dop back to .cr2.dop

Add .cr2.dop to Preferences / Miscellaneous / Advanced [Information Display]: multipart_extensions:

You can do it all in one operation, since it'll consider ".cr2.dop" to be the extension rather than just ".dop" now:

1 Like

Bonus: Opus will use the Exif data from the .cr2 for the .dop.

1 Like

Yes, as long as the .cr2.dop files come after the .cr2 files in the list (which they will, as long as the input files were sorted normally/alphabetically).

Sweet.. that works...

On another note, and not a biggie, when i take photos, now and then i take a video on the camera. The movie has a .mov extension. Naturally when I rename using Exif data, the file gets renamed to "_520.mov" (520 being the next number in sequence as the MOV i assume has no Exif data attached). Usually I only have a small handful of those, if that, so I just copy the prefix of the file and go to each MOV (which are now all at the top) and manually paste the prefix in and go down one at a time. Is there a way to do it automatically as part of the same batch? Again, not a big deal as i only have maybe 1-10 such files in a folder.

Video files contain Exif data as well. However, the tags are are named differently. I guess you are using the standard datetaken for your images. The equivalent for .mov can be difficult to find, doccreateddate is a good candidate. A tag working for both is probably create. Coming from the file system this property may change when the file gets edited.

I am using: {shootingtime|D#yyyy-MM-dd}_.\2

not sure why i used shootingtime vs datetaken.

I can use datecreated for the MOV as i do not edit it, but I cannot use it for the photos. Reason being... i take the photo on August 1, 2020. I get home a week or 2 later and convert my RAW images to JPG so i can edit it. I then edit the file, which may not even be on the same day I exported the RAW to JPG. By using the datecreated tag, it would use the date that the JPG was create, and not the date the photo was taken.

I just tried to put created (i think you had a typo) in place of shootingtime it basically does the same thing as doccreateddate. It will rename the MOV to the EXIF date and the JPGs to the date they were created, not the date the photo was taken.

So I may have to use 2 separate rename presets to do it, or just do it manually like i had been doing

I need to rename my JPGs and then the RAW images (stored in 2 different folders) and they need to be renamed identically. I generally use the same preset and then just click the last used button once i switch over from the RAW to JPG folder