Pages: [1]   Go Down

Author Topic: File renaming problem  (Read 5591 times)

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
File renaming problem
« on: August 14, 2016, 10:12:18 pm »

OK, so I messed up and had my camera date set with the wrong year - 2015 instead of 2016 - dumb I know, but easy enough to do. I imported them to LR before I realized the problem. When I imported them I used a custom file renaming scheme that uses the date as part of the file name. So now I have a bunch of photos that list in 2015 folders instead of the correct year of 2016.

It is easy to change the folder name, but I am having trouble figuring out how to rename the individual photo files with the date corrected to 2016. Searches for file renaming all find info for renaming groups of files (photos) during importing. 

1-I just want to change 2015 to 2016 in the file name - how do I do that? 
2-Also do I need to change the year in the metadata and how do I do that? 

Thanks for any help. I'm still brand new at this.  :o
Logged

Farmer

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2848
Re: File renaming problem
« Reply #1 on: August 14, 2016, 11:30:14 pm »

If you're on Windows, then http://www.bulkrenameutility.co.uk/ is an awesomely useful utility (even with Directory Opus, which, if you're on Windows and not using you're mad! :-) ).

If you're on OS X, sorry, not sure :(
Logged
Phil Brown

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #2 on: August 14, 2016, 11:45:00 pm »

I should have mentioned I'm working on a Mac.

Thanks though....
Logged

Scott Hein

  • Newbie
  • *
  • Offline Offline
  • Posts: 33
    • Hein Natural History Photography
Re: File renaming problem
« Reply #3 on: August 15, 2016, 12:00:00 am »

I use John Beardsworth's Search and Replace plugin as described in this link:

http://lightroomsolutions.com/complex-file-renaming-in-lightroom-thanks-to-search-and-replace/

-Scott
Logged

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #4 on: August 15, 2016, 01:36:26 pm »

Scott,
That looks interesting. Thank you for the suggestion.
Logged

john beardsworth

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4755
    • My photography site
Re: File renaming problem
« Reply #5 on: August 15, 2016, 02:15:44 pm »

Do you have Bridge?

I mention “string substitution” in the post mentioned by Scott. Essentially in Lightroom you save the metadata back to the files, rename them in Bridge using its “string substitution” feature which lets you change 2015 to 2016, and then back in Lightroom you synchronize the folders, importing the renamed files and removing references to the old names.
« Last Edit: August 15, 2016, 05:02:40 pm by john beardsworth »
Logged

FabienP

  • Full Member
  • ***
  • Offline Offline
  • Posts: 192
Re: File renaming problem
« Reply #6 on: August 15, 2016, 04:41:46 pm »

Renaming the file will only address part of the symptoms and will leave incorrect metadata in the original files. The internal shoot date present in the RAW file (I assume you have been shooting RAW files? anyway, the same would apply to JPEG files) will still display the wrong date. This could lead to confusion should you ever process the files outside of Lightroom.

One alternative approach would be to use exiftool to batch modify all dates for all files in a given folder. In your case, the following command would perform a shift of +1 year for all dates in files present in the current folder:

exiftool "-AllDates+=1:0:0 0:0:0" -verbose *.CR2

Note: replace the .CR2 extension in the example above with whatever file format you are dealing with.

You would then have to reimport the modified files in your Lightroom catalogue to have the correct dates set on import.

Disclaimer one: care should be applied when editing RAW or JPEG files with an external editor. Work on a copy of your files and ensure the processed files can be imported in Lightroom and worked on normally before discarding the original files. I have never encountered problems doing the action above, but you are doing this at your own risk!

Disclaimer two: I have been doing this on a PC, however it should also work on a Mac with the appropriate version of exiftool. The syntax of the command above might have to be changed slightly.

Cheers,

Fabien
Logged

MBehrens

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 321
Re: File renaming problem
« Reply #7 on: August 15, 2016, 07:56:12 pm »

The easy way, entirely in Lightroom...
No external tools. No re-importing.

In Lightroom, Library Module:
1. Select the files to be fixed.
2. Metadata - Edit Capture Time...
Change the capture time to to the correct date and time.
3. Library - Rename Photos...
Hopefully you are using a File Naming template on import. Simply apply this to the files again, this time it will have the correct date.
Logged

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #8 on: August 15, 2016, 09:45:01 pm »

Thanks to all for the replies.

 MBehrens your method certainly sounds the simplest. So I am giving it a try.

I can get the metadata changed easily through your step 2. But I have a problem at step 3 - when I go to library/rename I can't seem to get my standard custom file naming template to come up, the one that I use when initially importing. Shouldn't I be able to get that as an option?  Any idea as to what I am doing wrong?

FYI:
1-I am working on a Mac
2-using current version of Lightroom/photoshop CC
3-the files are RAW
4-I am importing and auto renaming with my file naming template on the original import

Thanks!
Logged

john beardsworth

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4755
    • My photography site
Re: File renaming problem
« Reply #9 on: August 16, 2016, 01:28:06 am »

You should be able to get your renaming template. Those available upon import are exactly the same as in renaming now.

If you can do the renaming in Lightroom, that's the best option. But you do have Bridge, so you could also use the method I outlined.
Logged

Lustrous

  • Newbie
  • *
  • Offline Offline
  • Posts: 25
Re: File renaming problem
« Reply #10 on: August 17, 2016, 05:06:40 am »

You may be able to use "File Number Suffix" to retain the original Image Number part of the Filename.
Construct in the re-name edit dialog-
Logged

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: File renaming problem
« Reply #11 on: August 17, 2016, 05:45:47 pm »

OK, so I messed up and had my camera date set with the wrong year - 2015 instead of 2016 - dumb I know, but easy enough to do. I imported them to LR before I realized the problem. When I imported them I used a custom file renaming scheme that uses the date as part of the file name. So now I have a bunch of photos that list in 2015 folders instead of the correct year of 2016.

It is easy to change the folder name, but I am having trouble figuring out how to rename the individual photo files with the date corrected to 2016. Searches for file renaming all find info for renaming groups of files (photos) during importing. 

1-I just want to change 2015 to 2016 in the file name - how do I do that? 
2-Also do I need to change the year in the metadata and how do I do that? 

Thanks for any help. I'm still brand new at this.  :o

If you have the photography extortion plan, then Bridge has tremendous renaming options.  You can build a sequence like you did originally and just substitute 2016 for the 2015.
Logged

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #12 on: August 17, 2016, 09:10:28 pm »

You should be able to get your renaming template. Those available upon import are exactly the same as in renaming now.

Yes, I thought that should work too. But there's a catch. My template includes "original file name" - on this case it was "DSC_#" (the original file name and image number recorded by the camera). If I now use the same custom naming sequence LR adopts my incorrect file name in its entirety as the new "original file name" and thus creates a new file name with the corrected date plus the old incorrect date and "DSC" part of the name. The only way I can seem to get rid of the "wrong date" portion of the original file name is to delete "original file name" from my custom naming protocol when renaming. The result however is that in doing so I loose the "DSC_#" portion of the true original file name. Not a tremendously big deal, but it is not just changing the year digit and keeping the rest of my originally intended file name which is what I wanted to do.

I suppose one could argue the need for the original DSC as part of the new file name. For instance, just go with the the date style you want plus the sequence number.  However if you end up importing to multiple folders with the same date you could end up with duplicate numbers if you forget to start the imports for different folders with a unique image number. By including the DSC_# in your file name you pretty much ensure that you will generate all unique file names when you rename during original import without any risk of duplicates.

Hopefully my explanation is clear enough for everyone to follow. The whole darned thing is a bit convoluted. 

Perhaps among other things I need to think harder about what I really need in the file name.....what do you all do? 
Logged

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #13 on: August 17, 2016, 09:14:10 pm »

If you have the photography extortion plan, then Bridge has tremendous renaming options.  You can build a sequence like you did originally and just substitute 2016 for the 2015.

I haven't tried Bridge yet. I was hoping to do it all in LR since I'm still very new to this and want to minimize complications. Considering the other response I just posted above, maybe I need to look at
bridge? 

Thanks to all for your suggestions!
Logged

dtrozzo

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
Re: File renaming problem
« Reply #14 on: August 17, 2016, 11:45:42 pm »

Edit the time of your photos using Metadata > Edit Capture Time. Choose> Adjust to a specific date and time. Highlight the year and change it to 2016 with the arrow- see below.

Then rename you pics. Create a new custom template and dont use >filename<. Use >custom text<, type your own custom text such as DSC_# or whatever works for you. Then add sequence and then add date or vis versa, see below. 


I personally don’t like using the file name the camera gives an image. It really doesn’t tell me anything about the file and starts to repeat afte DSC_9999. I use a date and sequence for my file name. Others my disagree but this works for me. Example: CustomText_Date_Sequence: myname_081716_0001

Logged

Brookie

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
Re: File renaming problem
« Reply #15 on: August 18, 2016, 10:47:45 am »

Dtrozzo,
That is what I am doing. The remaining problem is I can't retain the original DSC_# portion of the original file name without renaming each photo individually. Unless I am misunderstanding something, I can't keep the old DSC_# portion of the original file name (minus the incorrect 2015 date that became part of the imported file name) and rename a group of photos in a batch.
Thanks for the reply.
Logged

dtrozzo

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
Re: File renaming problem
« Reply #16 on: August 18, 2016, 09:08:21 pm »

Hi Brookie,

What i was suggesting would not save the original file name but allow you to overwrite the file name to the same original name. Providing that your naming was contiguous and you haden't deleted any in the sequence your numbers would be the same. John Beardsworth's/ dswaggar's suggestion works like a charm. I was able to find and replace text in a batch of images using the string substitution feature in the batch rename command. You are able to basically search and replace any text in a file name such as 2015 to 2016. Thanks for that guys!

-dave t
Logged

MBehrens

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 321
Re: File renaming problem
« Reply #17 on: August 19, 2016, 11:26:16 am »

Brookie,

I'm guessing you want the #### portion of the DSC_# filename and not the DSC portion? Metadata will tell you the camera, lens, etc...

The Filename Template token "{Filename number suffix}" will capture the DSC_# off of the original file or the renamed file.

I start with the camera filename IMG_0117.jpg
I rename it to my std template {Date(YYYYMMDD)}_{Hour}{Min}{Sec}_{Filename number suffix} to give me: 20050117_134633_0117.jpg
I can rename it again to a different template {Date(YYYYMMDD)}_{Filename number suffix} and I get: 20050117_0117.jpg

The {Filename number suffix} will keep the camera number and apply it to the new filemane.

If you have lost the {Filename number suffix} from the filename by renaming it away, then reset the filename by using the {Original filename} token. This will reset them to the DSC_##### name. Now you can start over with a new more effective Filename Template.

The key here is to use the metadata tokens and not the {Custom text} token to do the renaming. I gave up trying to come up with names a long time ago. As long as the filename is unique I'm OK with it. Sometimes when exporting I'll add some text, but very seldom.

Good luck.
Logged
Pages: [1]   Go Up