alan_harper's profile

497 Messages


10.6K Points

Thu, Aug 11, 2011 7:59 PM



Lightroom: How do you tell if automatically write changes xmp is complete?

I think I have localized one of the problems I am having with cataloging my photos with Lightroom: even if you click "automatically write changes into xmp", Lightroom will quit without warning you that changes were not written.

For instance, I took a keyword that had about 1,000 images associated with it and renamed it, then I quit. The sidecar associated with some of the files did not have a recent modification date, indicating that changes were not saved to the file. Restarting Lightroom and hitting save for these photos did save the changes (with a progress bar indicating that the save was taking a while).

I have been going through my own private nightmare where I changed the name of some folders high up in the directory of keywords (names of folders of folders of keywords), and then imported all my photos into a new catalog. What I found is that the photos have come in with the old and new hierarchies, which has been a mess to figure out. I assume that this is because Lightroom didn't write the changes before quitting, leaving me with an inconsistent set of keyword hierarchies on disk.

Is there something I am missing? If this is just a bug (well, feature error), I'll post a suggestion to get it fixed.


Official Solution

Adobe Administrator


16K Messages


296.7K Points

5 y ago

This was added in Lightroom 4 and later.



2.6K Messages


33.7K Points

10 y ago

The thing your missing, if you want to put it that way, is understanding the need to do an explicit Save Metadata to Files operation and wait for the progress bar to finish on all the files you changed if you want to rely on the XMPs being up-to-date.

To identify the files that have had recent changes, you can use the "Recently Modified" Smart Collection, perhaps changing the default of two days to something less if you want to narrow the scope to what you've just done, but the safest thing is to explicitly save metadata of all files that have the possibility of having been modified.

Rob Cole may have a plug-in that will help identify exactly which files might have out-of-date XMP data, although I am just assuming it would help based on the description, never having tried it, myself:

Depending on how long such a plug-in would take to scan all your files, it may be more efficient to select ALL your photos and do an explicit Save Metadata to Files on them.

4.5K Messages


76.3K Points

ChangeManager can isolate files changed since locking, but won't help isolate files changed since xmp last saved, if xmp save was not by-way-of ChangeManager locking.

Since I lock files after editing, which saves xmp, (and since I dont care if a photo was changed if the net result is still the same as the locked photo) I no longer concern myself with this issue, however if I were to attack a solution, I would write a little script/app that queries the catalog for metadata status, then starts up Lightroom, with a plugin on the other end to round up photos with various metadata issues into collections. All of this is doable now albeit not so automated by:

- finding a way to issue some SQL like shown below, say SqlLite-Spy or somethign, and save results to file.
- using LrTransporter ( I think it was ), to make the collection in Lightroom from the saved file.

Some people are doing this now, but have not shared turn-key solutions...

Here's some example SQL anyway:

select ''
,LibraryRootFolder.absolutePath || LibraryFolder.pathFromRoot || LibraryFile.lc_idx_filename as fullFileName

from Adobe_images as Image
,AgLibraryFile as LibraryFile
,AgLibraryFolder as LibraryFolder
,AgLibraryRootFolder as LibraryRootFolder
,Adobe_AdditionalMetadata as AdditionalMetadata

where Image.rootFile = LibraryFile.id_local
and LibraryFile.Folder = LibraryFolder.id_local
and LibraryFolder.rootFolder = LibraryRootFolder.id_local
and AdditionalMetadata.image = Image.id_local

-- ----------------------------------------------------------------------------------------
and (Image.sidecarStatus not in (0, 7)
or AdditionalMetaData.externalXmpIsDirty > 0)
-- ----------------------------------------------------------------------------------------

order by fullFileName


497 Messages


10.6K Points

10 y ago

Yes, I see your point. I think I'll still put in a request that Adobe fix it (I think that they should put up a progress bar, when the automatically write changes switch is selected).

I now have a couple of plug-ins that I need to check out.


497 Messages


10.6K Points

10 y ago


I think your solution doesn't work. I just tried setting up a collection "Today" which is "Edit Date within last 1 days". I then took a keyword that was the sub of one keyword and dragged that keyword so it became the sub of a different keyword. The photos with that keyword did not enter the "Today" smart collection, and if I sort by Edit Time, the photos with that keyword do not move in the sort order. However, if I wait long enough (a few seconds for a small set), then the modify date on disk is changed. (I could check the keyword hierarchy to be sure, but I haven't done so yet).

Interestingly, changing the hierarchy of keywords changes the Metadata Date as reported in the metadata panel (as it should), but it does not change the order for "Edit Time" in the View menu.

So, as far as I can tell

a) "automatically write changes" saves changes in the keyword hierarchy if you wait for it to complete (ie, it works as it should)

b) there is no easy way to know if it has completed, other than checking the modify date of all the affected files on disk. In particular, the "metadata status" of the affected files does not change, but stays "Up to date" before the new metadata hierarchy has been written out. The metadata date updates to the time of the change in hierarchy, and may reflect the time that the metadata was written out, but I'm not sure.

c) changing the keyword hierarchy does not affect the internal Lightroom modify time, unless you read the metadata from disk, at which time that file becomes the most recent file (ie, its sort order reflects the time that you read the metadata, not the time that you set the metadata).

On a closely related subject, do you know what sort by Edit Time sorts by? Is that time available in any panel?




478 Messages


10.7K Points

10 y ago

Hi Alan,

Whether bug, or "feature error," I agree this sounds problematic. I've reported the issue to the engineers.