Doing it with a script outside of Lightroom will cause chaos best avoided.
I'd check out John Beardsworth's site as he has plugins that do some tricky things.. Contact John or find him here and PM him...
A few thoughts:
1. Only rename through Lightroom. It's too prone to error and tedious if you try to rename in both places and want to keep them in synch.
2. Depending on your camera, the sequence numbers will recycle at some limit. On some of my cameras the seq number limit is 999 and then it returns to 001 again. If you ever have a shoot where you take more than the limit (easy to do for events) your existing scheme will not work as you will get duplicates even within one folder. The cameras get around this by forcing a new folder to the card.
3. I use a photo file naming scheme based on date, time and original name. That is "yyymmdd-hhmmss-originalname" where original name is that provided by the camera. With this you will not get a name conflict if you only use one camera and are not likely to get a conflict if you use more than one camera. I import into Lr and then rename using standard Lr options. After you do it once you can save as a preset.
4. It is my understanding that if you do not rename a photo file as part of the original import into Lr then the original name is saved in the metadata. Thus a rename using the scheme above should always work anytime after import. This seems to have worked for all of my cameras (30D, D700, D810, X100s) but I am not sure if it works for older cameras and phones. If this is not correct then I hope somebody can enlighten me.
@ Geoff: The script would only be for renaming the original files outside LR. I certainly would not presume to try and mess with the names inside LR, and LR renaming would only be through LR facilities, or possibly plugins if very well vouched for.
@zolad: MY main camera (A6000) uses 99999 numbering which would cover any shoot Im likely to do (Im a amateur); and my other cameras use 9999 which is probably also sufficient. But you make a good point in general I guess a future camera may wrap around more quickly.
The naming protocol you describe in (3) is inside LR or outside? It sounds like you are referring to inside. I use a similar naming protocol inside LR. What do you do outside (your equivalent of my originals folder).
Regarding my original question, if Im right that LR cant use the sort of renaming rule that Id need, then Im thinking Im best leaving the existing images as is, and just get it right going forward.
I am not sure I understand what you mean. There is no "inside Lightroom" and "outside Lightroom" for photo files.
The Lightroom Catalog references your photos where ever they are on your disks. The photos themselves are never copied into Lightroom or into Lightroom's Catalog. That is, when you use the Lightroom (Lr) Import function you are not actually importing the photos into a Lightroom storage space, you are simply telling Lr where the photos are located. This is much the same as a catalogue in an ordinary library full of books, the books themselves are not stored in the catalogue but on the bookshelves. Similarly, photos are not stored in the Lr Catalog but somewhere on your disk(s).
The Lr Import function allows you to Add photos which just places references in the Lr Catalog, or Copy which first copies the photos somewhere else on disk from where they are now, and then adds references to the Lr Catalog for these new locations. When you edit a photo in Lr the photo file itself is not changed (except in certain circumstances for metadata). The edits are held in the Lr Catalog. When you use the Lr Export function a new photo file is created which you have to place somewhere on disk (or the web, the cloud or where ever). Again, these are not held inside Lr.
My process for getting photos into Lr is as follows:
1. Place camera card into card reader on my computer,
2. Use the Lr Import function with the Copy option to move the photos where I want them on disk and add them to my Lr Catalog, (usually adding keywords and a develop preset) but NOT renaming them,
3. Switch to the last import or the destination folder, select all photos and then use the Lr Rename function to rename to the format I mentioned before.
4. Update my backup to include the latest photo imports (usually by cloning my photo library disk) which will backup the renamed photo files.
So I only have Original photo files and I have them in multiple places for backup purposes.
I see no value in converting images to DNG format, especailly if you are going to keep both the original file and the DNG file. If you really wanted to do that I'd probably try to Import into Lr first, then rename and THEN convert to DNG, keeping the original files. I'd then copy the originals to a backup drive.
@ Geoff: The script would only be for renaming the original files outside LR.
As Geoff said, this would result in chaos, effectively destroying the usefulness of your Lightroom catalog. Do not use a script to rename photos outside of Lightroom.
I'd go with do nothing.
It doesn't sound like you have a need to rename, since they are happily residing in both Lr's catalog and in the filesystem despite having the same name. You'd have to have a very unique set of circumstances for one to overwrite another with the same name. And the names you do have are not very descriptive. If you do need something to show sequence, use Lr's file renaming to add it to the existing filename perhaps.
Renaming outside Lr is, as dj_paige noted, rather risky. It can be done and preserve much of what's in Lr, but that can involve writing then reading metadata from the files, and the renaming also has to account for the RAW sidecars, if you use those.
Usually you can find lots of other ways in Lr to store info that many people put into file names, and that info (captions, keywords, etc etc) can often be manipulated more easily for export, etc.
I may have missed out an aspect of the work-flow.
i do a simple copy to the originals folder.
Then I import using Copy as DNG.
THe reasons for this are
- following advice in DAM manual, DNG appears to be an accepted, common format as opposed to camera specific
- i backup the originals folder and the LR catalog and library files to different drives
So the file names In the originals folder are as I understand it distinct from the names assigned by LR on import. Put another way, once the import is done, LR could care less about the original names. (I'm not Adding). Or is that wrong and LR tracks the original name ( and location) As well as the current LR name and location? Having said that I'm not keen to rename those, I can document what's what. I'm just not sure what problem I may run into in future with having non-unique file names in my Orignals folders.
But, yes, absent an amazing , bullet-proof, "rename and sync back to Orignals" tool, doing nothing seems the safest course!
So if I'm understanding you properly (and I may not be), you want to rename the RAWs after you import via Copy as DNG. Is that right?
Lightroom works perfectly well if you import via Copy as DNG, and then rename the RAW originals. I don't see any purpose to this, I see it as extra work that just causes additional confusion, as then it would be extremely difficult to recover if your DNG was corrupted or accidentally deleted or on a HD that crashed. But since you will have backups of your DNGs, perhaps this isn't an issue ...
Non-unique files names are not a problem as long as they are each in different folders. Over the years, I have used 2 different cameras, and cycled past 10000 images (causing the names to be re-used) on one of the cameras, and so in my collection, there are three different photos named (for example) DSC1111.NEF, in three different folders, and Lightroom does not have the slightest problem with this.
Regarding "DNG appears to be an accepted common format", there are a large number of people who agree with this and convert all their RAWs to DNG (for this reason and other reasons as well), and there are a large number of people who couldn't care less and don't think that a "Camera specific" format is the least bit of a drawback. I'm not taking sides here, I'm just letting you know that not everyone buys this argument.
IF I were to do it (and as I said Im now leaning to not doing it) it would be to rename both the RAW original and the LR DNG so they are both in sync.
DSC00302.AWR > DSC10498.AWR
RMJF-06718-DSC00302.DNG > RMJF-06718-DSC10498.AWR
In the first post, you stated you would like to do this renaming, but you haven't stated why. What benefit is there? What harm is there to doing nothing?
Now maybe you have perfectly valid reasons, and you just haven't stated them. My point of view is that I want my workflow as simple as possible, and so my worfklow does not include renaming photos. That works for me. So I'm really confused why you think these difficult renaming problems are worth considering in the first place.
I agree with dj_paige. It's a Keep It Simple thing. Your renaming doesn't add anything to the info stored in the filename. I don't quite understand the "in synch" issue; the files START with the same filename and just have a different filetype suffix.
In the very worst case scenario your original RAW (say IMG1234.CR2) gets moved to the same folder where you already have a file by that name; the system won't let that happen, so it will give you a prompt, or do IMG1234_copy.CR2 or something. But you could still find it with a search on "IMG1234" or even 1234. Lr is database driven, and it assigns unique identifiers to images, and can tell if they're different, so don't worry about that. In short, your attempts to rename may present more of a risk than simply living, as most of us do, with the same file names in different folders (I have tons of old digital photos from back in the day where the filename numbers only went to like 9999, and so have many duplicates, and that doesn't affect anything).
And you are sort of wrong about Lr not caring about the original filenames. Take a look at the DNGs you made,and at the EXIF and IPTC Metadata panel. You should see "Original File Name" in there, the name of the .CR2 you copied to DNG. It's stored in EXIF in the DNG itself. But if subsequently you change the name of the .CR2, which isn't in Lr's catalog, Lr will never be able to change "Original File Name" (at least not without a lot of manual work) and that info will be left there, inaccurately and misleadingly.