Salut la communauté, j'ai bien vu les posts les plus proches de cette présente question mais je n'ai toujours pas de solution adaptée aux gros volumes à traiter.
J'utilise Lightroom pour taguer mes photos, ce qui me permet de les retrouver plus efficacement par la suite soit dans Windows, soit dans Moments (Synology), etc.
L'intérêt est donc que les mots clés soient enregistrés dans le champs correspondant de chaque photo.
Lorsque je demande à Lightroom d'enregistrer les changements, il enregistre les mots clés mais remplace aussi la date de capture par la date du jour.
Il existe des outils qui permettent de modifier la date mais lorsque l'on a des miliers de photos à des dates et heures différentes, cette solution n'est tout simplement pas adaptée.
Comment faire pour n'enregistrer que les métadonnées modifiées et non la date de capture qui n'a jamais été modifiée ?
Il n'est pas question ici d'export de nouveaux fichiers mais bien d'écriture dans les fichiers originaux.
Au plaisir de vous lire.
Copy link to clipboard
Please state clearly if you are using Lightroom or Lightroom Classic, and the version NUMBER.
Please state clearly your operating system version NUMBER.
Thank you for your answer @dj_paige
I'm using Lightroom Classic v.10.2 and Windows 10 v.19.09
Still this issue is the sams whatever version I'm using (earlier versions of Lightroom Classic and Windows 7)
In Windows 10, I see RAW files have not had their creation date changed when I add metadata via Lightroom. For JPGs, the creation date changes, but there is another field in Windows Explorer named "Date Taken", it doesn't show by default but it can be turned on, which does not change when you update the metadata.
I am curious, however, why this is an issue. In Lightroom Classic, the capture date does not change when you add metadata, and so photos are always searchable by capture date. In my opinion, I think all searching for photos should be done in Lightroom Classic, and so the issue goes away.
Copy link to clipboard
Google Translation: "Lightroom changes capture date when saving keywords.
Hi community, I saw the posts closest to this question, but I still don't have a suitable solution for large volumes to process.
I use Lightroom to tag my photos, which allows me to find them more efficiently afterwards either in Windows, or in Moments (Synology), etc.
The advantage is therefore that the keywords are recorded in the corresponding field of each photo.
When I ask Lightroom to save the changes, it saves the keywords but also replaces the capture date with today's date.
There are tools that allow you to change the date but when you have thousands of photos at different dates and times, this solution is simply not suitable.
How to save only the modified metadata and not the capture date which has never been modified?
There is no question here of exporting new files but of writing to the original files."
It sounds like these photos are missing capture dates stored in their metadata. There are many reasons a photo may be missing a capture date, including: It came from a scanne or an old digital camera, or it was downloaded from an online service that stripped metadata from the photo.
When LR imports a photo that is missing capture date in its metadata, LR uses as its capture date the file's date-modified field that is maintained by the operating system. The file's date-modified changes whenever any app changes the file for whatever reason. When the date-modified changes, LR immediately notices and sets the photo's capture date in the catalog to that new date-modified. (This is a horrible product design, but Adobe has never cared about supporting metadata of photos coming from other than modern digital cameras.)
So when you change the photo's keywords and then do Metadata > Save Metadata To File (or if you have set the option Catalog Settings > Metadata > Automatically Write Changes Into XMP), LR updates the photo's file with the new keywords and the operating system changes the file's date-modified to "now". LR notices that and immediately changes the capture date recorded in the catalog to "now".
To work around this:
1. Make a backup of your catalog (better, make two backups). LR doesn't let you undo changes to capture date.
2. Uncheck the option Catalog Settings > Metadata > Automatically Write Changes Into XMP.
3. Select all photos and do Metadata > Edit Capture Time. Immediately click Change All.
These steps record the capture date currently displayed by LR for each photo into the photo's EXIF metadata (where digital cameras record it). Going forward, any changes to the photo won't cause the capture date to change. Note that step 3 DOES NOT change all the photos to have the same date.
I ran a fews tests checking the before-after for each picture properties and I come back to give feedback.
Since the Edit Capture Time is initially set to "Adjust to a specified date and time", for step 3, I would add :
"Select all photos and do Metadata > Edit Capture Time > Change to file's creation date. Immediately click Change All."
Now my problem stays the same because the creation time isn't the right one. It tends to be the time when the OS wrote the file on the hard drive. (Creation time and Modified time are allways the same. Shame)
It's fortunate that each picture is properly named as follows : aaaammdd_hhmmss.jpg (for instance : 20210607_175459.jpg)
So I need to find a script that writes the date/time from the name to the capture date. This stays my quest and I'm still grateful to this community for having helped me around Lightroom.
Still if someone has it in Python or whatever, please let me know and I'll buy you a beer 😉
'Since the Edit Capture Time is initially set to "Adjust to a specified date and time", for step 3, I would add :
"Select all photos and do Metadata > Edit Capture Time > Change to file's creation date. Immediately click Change All."'
When the photos are missing capture dates on import and the file-created date is the same as the file-modified date for each of the photos, then Adjust To A Specified Date And Time and Change To File's Creation Date have the same effect. This is because LR sets the initial catalog capture date of these photos to the file-modified date (which is the same as the file-created date in this case).
(Note that Adjust To A Specified Date And Time does not set all the photos to have the same date -- as the command explains, it shifts all the photos' capture dates by the amount that the most-selected photo is adjusted.)
Copy link to clipboard
"It's fortunate that each picture is properly named as follows : aaaammdd_hhmmss.jpg (for instance : 20210607_175459.jpg) So I need to find a script that writes the date/time from the name to the capture date."
1. Select all the photos and do Metadata > Save Metadata To File.
2. Use a text editor with regular expressions or Excel (if you're an Excel junky) to transform that list to a list of shell commands invoking the free Exiftool utility to set the files' EXIF:DateTimeOriginal field. E.g. given this line in the text file:
the text editor or Excel formula transforms it to this line:
exiftool -exif:datetimeoriginal="2021:06:07 17:54:59" "/users/john/pictures/20210607_175459.jpg"
3. Run that shell script / batch file.
4. With all the photos selected, do Metadata > Read Metadata From File.
Thankyou again @johnrellis for this great tip. I'm an Excel/vba junky so I may develop the right program that can :
Then I can upload the excel file so that anyone can use it.
I wonder if I check this thread as solved, I may not be able to do so, right ?
I come back to give some feedback on the process.
I exported metadata using AnyFilter but as many of these plugins, the result doesn't keep the western european accents in the paths of the photos.
So now I only use a .bat file to extract what I need the way I need. Here is the process:
chcp 65001 > null
exiftool -csv -m -r -L "-exif:datetimeoriginal" "-filemodifydate" %* > C:\Path\2_Listing.csv
I drag and drop a folder containing many subfolders and pictures on this .bat file, then it creates/erases the following file:
Then I open my new automated best friend:
It imports the list from above .csv file,
then splits and filters data into columns:
Then the ExifTool batch command lines are pasted on the following .bat file:
chcp 65001 > null
exiftool -exif:datetimeoriginal="2018:07:16 20:47:57 " "//server/homes/Path/20180716_204757.jpg
exiftool -exif:datetimeoriginal="2018:03:02 04:54:30 " "//server/homes/Path/20180302_045430.jpg
exiftool -exif:datetimeoriginal="2019:12:28 12:07:02 " "//server/homes/Path/20191228_120702.jpg
I got 1981 lines at the first time.
Then I ran the 4_Script.bat and it did the job..
..sort of, I still need to fix a few date syntaxe bugs.
Thanks for the update on your process -- that will help others.
The problem with disappearing accented characters is an Excel issue. LR and LR plugins represent characters using Unicode UTF-8, and the Any Filter plugin writes CSV files in UTF-8. By default Windows Excel (but not Mac Excel) opens such files using some legacy character encoding. See this thread for how to open UTF-8 CSV files in Excel. I forgot to warn you about this issue.
Oops, here's the thread I referenced: https: // stackoverflow .com / a /6 488070 . (Remove the spaces in the link -- the stupid forum software doesn't let me post the actual link.)