# XMP and DNG Files



## Ramona (Jan 6, 2019)

Why am I now getting XMP files again? I have the checkbox set to automatically write changes into XMP file. I thought I wanted that checked to keep the changes in the DNG file. Is this not correct? I do not want XMP files.


----------



## Jim Wilde (Jan 6, 2019)

If you have that option checked, you shouldn't get XMP files for DNGs but you will get them for proprietary raw files. Check the filetype of the files that have an XMP sidecar.


----------



## Johan Elzenga (Jan 6, 2019)

Ramona said:


> Why am I now getting XMP files again? I have the checkbox set to automatically write changes into XMP file. I thought I wanted that checked to keep the changes in the DNG file. Is this not correct? I do not want XMP files.


That is not correct. That *does* write changes to the files, and as Jim said, you’ll get XMP files for proprietary raw. DNG should *never* have a sidecar file, regardless of this setting. If you do get an XMP file with your DNGs, then I wonder if you are using other software that could do this. Lightroom shouldn’t do that, ever.


----------



## Ramona (Jan 6, 2019)

I've been saying that a lot. I'm not sure what other software you might be suspecting but here's a grab from yesterday.


----------



## Johan Elzenga (Jan 6, 2019)

So? Are you using any other software with your images? These XMP files could have been created with your proprietary raw files (possibly by other software) _before_ you converted them to DNG. The modification date should reveal that.


----------



## Ramona (Jan 6, 2019)

No, no other software.  Same process, same camera, same software. Is this what you mean by modification data?


----------



## Johan Elzenga (Jan 6, 2019)

It would be helpful if you showed the window header, so we can see which date is which. I do notice something that suggests that these are indeed slightly older XMP files: The selected DNG file has 5:47 PM in the first column, suggesting that this is the modification time and that metadata were written to this DNG file at 5:47 PM, while the DNG and the XMP were _created_ (second column) at 5:12 PM.

Can you select one of the xmp files and then choose 'File - Get Info' (or press Cmd-i)? Then post a screenshot of the dialog that comes up. I wonder where that green icon comes from and if that can tell us something more. XMP files on my Mac don't have that.

So how were these DNG files created? Do you shoot in RAW in your camera and use 'Copy as DNG' when importing in Lightroom? Another way? What camera?


----------



## Jim Wilde (Jan 6, 2019)

As well as the "Get Info" on an XMP file, it would also be useful to see a screenshot of a "Get Info" on the associated DNG file. I have a vague recollection that many years ago Rob Cole was trying to force Lightroom to write XMP sidecars for DNG files, and for that he was setting the security permissions of the DNG files to "Read Only". I can't recall if he was successful, but it would be sensible to rule out that possibility, however remote.


----------



## Johan Elzenga (Jan 6, 2019)

Jim Wilde said:


> As well as the "Get Info" on an XMP file, it would also be useful to see a screenshot of a "Get Info" on the associated DNG file. I have a vague recollection that many years ago Rob Cole was trying to force Lightroom to write XMP sidecars for DNG files, and for that he was setting the security permissions of the DNG files to "Read Only". I can't recall if he was successful, but it would be sensible to rule out that possibility, however remote.


Because the DNG file seems to have a different modification time, I would rule that out already. I wonder what would happen if you convert HEIC to DNG. Apparently Lightroom does produce an XMP file for HEIC images (even though that is not necessary because HEIC supports embedded metadata), so after conversion to DNG, that XMP may be left behind as an orphaned sidecar file. The screenshot shows that none of the XMP files have a different modification time.


----------



## Ramona (Jan 6, 2019)

JohanElzenga said:


> It would be helpful if you showed the window header, so we can see which date is which. I do notice something that suggests that these are indeed slightly older XMP files: The selected DNG file has 5:47 PM in the first column, suggesting that this is the modification date and that metadata were written to this DNG file at 5:47 PM, while the DNG and the XMP were _created_ (second column) at 5:12 PM.
> 
> Can you select one of the xmp files and then choose 'File - Get Info' (or press Cmd-i)? Then post a screenshot of the dialog that comes up. I wonder where that green icon comes from and if that can tell us something more. XMP files on my Mac don't have that.
> 
> So how were these DNG files created? Do you shoot in RAW in your camera and use 'Copy as DNG' when importing in Lightroom? Another way? What camera?





JohanElzenga said:


> It would be helpful if you showed the window header, so we can see which date is which. I do notice something that suggests that these are indeed slightly older XMP files: The selected DNG file has 5:47 PM in the first column, suggesting that this is the modification date and that metadata were written to this DNG file at 5:47 PM, while the DNG and the XMP were _created_ (second column) at 5:12 PM.
> 
> Can you select one of the xmp files and then choose 'File - Get Info' (or press Cmd-i)? Then post a screenshot of the dialog that comes up. I wonder where that green icon comes from and if that can tell us something more. XMP files on my Mac don't have that.
> 
> So how were these DNG files created? Do you shoot in RAW in your camera and use 'Copy as DNG' when importing in Lightroom? Another way? What camera?


I shoot in raw and copy as DNG. I have processed some of these which would mean the DNG is modified after creation. Those with  corresponding jpgs. Heres the xmp.


----------



## Ramona (Jan 6, 2019)

JohanElzenga said:


> Because the DNG file seems to have a different modification time, I would rule that out already. I wonder what would happen if you convert HEIC to DNG. Apparently Lightroom does produce an XMP file for HEIC images (even though that is not necessary because HEIC supports embedded metadata), so after conversion to DNG, that XMP may be left behind as an orphaned sidecar file. The screenshot shows that none of the XMP files have a different modification time.


I don't know but this comes from a camera, images taken yesterday. Has nothing to do with HEIC.


----------



## Ramona (Jan 6, 2019)

JohanElzenga said:


> Because the DNG file seems to have a different modification time, I would rule that out already. I wonder what would happen if you convert HEIC to DNG. Apparently Lightroom does produce an XMP file for HEIC images (even though that is not necessary because HEIC supports embedded metadata), so after conversion to DNG, that XMP may be left behind as an orphaned sidecar file. The screenshot shows that none of the XMP files have a different modification time.


I'm curious about the icon as well.


----------



## Johan Elzenga (Jan 6, 2019)

Ramona said:


> I'm curious about the icon as well.


That icon comes from the Grammarly app that you have installed. No idea why it is associated with XMP files on your Mac, but that doesn't seem to be the cause.



Ramona said:


> I don't know but this comes from a camera, images taken yesterday. Has nothing to do with HEIC.


Which camera? Nikon Z6 or Z7 perhaps?



Ramona said:


> I shoot in raw and copy as DNG. I have processed some of these which would mean the DNG is modified after creation.


DNG files are not modified themselves by processing, but what you see here is the writing of changes to the metadata. The XMP does not get modified, which does indeed indicate that these are orphaned files.


----------



## Ramona (Jan 6, 2019)

JohanElzenga said:


> That icon comes from the Grammarly app that you have installed. No idea why it is associated with XMP files on your Mac, but that doesn't seem to be the cause.
> 
> 
> Which camera? Nikon Z6 or Z7 perhaps?
> ...


Sony 7rii


----------



## Ramona (Jan 6, 2019)

Ramona said:


> Sony 7rii


Of course, Grammerly would grab text based files which xmp files are and that would make sense they aren't being changed they are just left behind after the conversion, orphans.


----------



## Johan Elzenga (Jan 6, 2019)

Ramona said:


> Of course, Grammerly would grab text based files which xmp files are and that would make sense they aren't being changed they are just left behind after the conversion, orphans.


No, Grammarly doesn't 'grab' anything. MacOS X associates each file type with an application. On your Mac it has associated XMP files with Grammarly. That is fine because Grammarly is a text editor, but it's not a very logical association and so the question is why. However, that has nothing to do with the question why these XMP files are created in the first place.


----------



## Johan Elzenga (Jan 6, 2019)

Ramona said:


> Sony 7rii


And how do you create the DNG files? Do you do that in Lightroom? On import, or later?


----------



## Ramona (Jan 7, 2019)

JohanElzenga said:


> No, Grammarly doesn't 'grab' anything. MacOS X associates each file type with an application. On your Mac it has associated XMP files with Grammarly. That is fine because Grammarly is a text editor, but it's not a very logical association and so the question is why. However, that has nothing to do with the question why these XMP files are created in the first place.


It has indeed grabbed the file association. The why is because it's a plain text file.  You are correct, it has no bearing whatsoever on the mystery XMP files.


----------



## Johan Elzenga (Jan 7, 2019)

Ramona said:


> It has indeed grabbed the file association. The why is because it's a plain text file.  You are correct, it has no bearing whatsoever on the mystery XMP files.


No, it not that simple. XMP may be a text file, but that doesn't mean it will automatically be associated with a text editor. That's not how this works. Grammerly doesn't grab anything, MacOS X decides this. And why Grammarly? Why not TextEdit, Apple's own text editor? These associations are normally made by the user. In that dialog you select Grammarly, and then click on the 'Change all...' button. Maybe that is what you did sometime in the past.

Anyway, that doesn't explain where the XMP files come from, so please answer my question about how you convert your RAW files to DNG.


----------



## Ramona (Jan 7, 2019)

I did answer it above, I shoot in raw and copy as DNG. 
If you wish to say the OS assigns rather than Grammerly taking the assignment fine but my view is when I installed Grammerly it grabbed all the text associations. 
Now that you've caught up I believe the correct answer is the XMP files are not being deleted after the conversion. They are orphaned.


----------



## Johan Elzenga (Jan 7, 2019)

I asked you *how* and *when* you convert to DNG; in Lightroom on import, in Lightroom after import or some other way.


----------



## Johan Elzenga (Jan 7, 2019)

Ramona said:


> If you wish to say the OS assigns rather than Grammerly taking the assignment fine but my view is when I installed Grammerly it grabbed all the text associations


I do not ‘wish’ to say that, it’s how MacOS X works. But let’s stop this part of the conversation because it’s irrelevant.


----------



## Ramona (Jan 8, 2019)

JohanElzenga said:


> I asked you *how* and *when* you convert to DNG; in Lightroom on import, in Lightroom after import or some other way.



*I shoot in RAW and copy as  DNG on import into Lightroom.* 



 The issue is the XMPs are not being deleted on conversion. That's where we are at this point.


----------



## Johan Elzenga (Jan 8, 2019)

Ramona said:


> *I shoot in RAW and copy as  DNG on import into Lightroom.* View attachment 12038
> 
> The issue is the XMPs are not being deleted on conversion. That's where we are at this point.


OK, sorry about the confusion but I had to be certain. You can also convert *after* you have imported the images (via the menu '*Library - Convert Photos to DNG*'), or you could convert *first* by using Adobe DNG Converter and *then* import the DNGs in Lightroom. I needed to know for certain which option you use, to see if I can replicate what you find. I can't, however so all I can tell you is that you can safely delete these XMP files if they bother you. Lightroom is not using them.


----------



## Jim Wilde (Jan 8, 2019)

Ramona said:


> The issue is the XMPs are not being deleted on conversion. That's where we are at this point.



Actually, I think the issue may be that the XMPs shouldn't be created in the first place. Converting a raw file to DNG in Lightroom should not do that, so it's something of a mystery.

One suggestion would be to update to the latest version of LR Classic (8.1) just in case you've uncovered a bug in the Copy as DNG import process in 8.0 (either by creating XMP sidecars during the conversion process, or more likely by creating an XMP sidecar to the original raw file - because you have Auto Write to XMP enabled - which then doesn't get deleted along with the raw file when it's converted to DNG). Using 8.1 I've tried to get LR to create XMP sidecars during a Copy as DNG import, but could not. I've also converted existing Raw files to DNG after import, having first ensured that XMPs were created, but the subsequent conversion correctly deleted the XMP sidecar if Raw files were set to be deleted as well. The bottom line is that I cannot get Lightroom to mis-behave in this situation, and it sounds like Johan can't either.

Are you seeing the problem during every import? If so, I'd definitely do that update before running another import to see if that fixes the issue.


----------



## Ramona (Jan 6, 2019)

Why am I now getting XMP files again? I have the checkbox set to automatically write changes into XMP file. I thought I wanted that checked to keep the changes in the DNG file. Is this not correct? I do not want XMP files.


----------



## Johan Elzenga (Jan 8, 2019)

Exactly. I tried the same things, and got the same results, i.e. that Lightroom behaves as expected.


----------

