

Sed -e 's/\(.*\)/\L/' -e 's//_/g'Ĭurl -s0 -q -k "$')_contact.jpg"Īnd here I am, hopefully on the way to organizing my mess of a photo archive. The command used there is (take note of the use of backticks, not single quotes): touch -t exiftool -s -s -s -d 'YmdHM.S' -DateTimeOriginal TEST.JPG TEST.JPG But I'm curious about your error. # Add a tag to the file with that file's filenameĮxiftool -P -overwrite_original_in_place '-XMP-xmpMM:PreservedFileName/dev/null | \ And, by the way, if you want to see the available tags in a file, use this command: exiftool -a -G1 -s
Change creation date exiftool free#
Feel free to drop this step if the original filename is not something you care to remember. It should be noted that adding a tag to a file requires rewriting the entire file, which adds quite a bit of time to the renaming process. Having said that, I thought it might be a good idea to add the original filename as an Exif tag just for record-keeping purposes, and so I can find it in the Lightroom catalog, should the need arise. The original filename contained no useful information, so I did not want it to be a part of the new filename.

This will let exiftool know that the CreateDate, which is supposed to be written as UTC time, was correctly written and to adjust it to the local time.Many older cameras would write the time stamp as local time instead of UTC. You don’t really want to make that filename too long. If the timezone (+09:00) is the local time on the computer you are using, then add -api QuickTimeUTC to the command. I thought including city, state, and country in the filename was sufficient for my needs. Here’s an example of my “perfect” filename for photos:Ģ0200822-1845-000-philadelphia_pa_us-xt3.jpg Now, since multiple photos could’ve been taken at roughly the same time, with the same camera, and at the same location, the filename would also need to contain some sort of numerical auto-incremental field. The following command extracts the Track Creation Date and writes it as the File Creation Date and also renames the file to match (and appends a lowercase file extension): exiftool. For my purposes, I only needed a small subset of the functionality offered by exiftool (which, for some reason, I keep misspelling as ‘exitfool’…)Īnyway, I needed the filename to contain the timestamp when the photo was originally taken, the camera model (as short as possible – just enough for me to identify the equipment I used), and the location where the photo was taken (provided the camera supported geotagging). Track Create Date : 2011:02:27 12:11:11 Track Modify Date : 2011:02:27 12:11:24 I could use one of these to set the rest of the metadata of the file. The exiftool by Phil Harvey has been described as the Swiss Army knife for file metadata manipulation, and it certainly is that. File Size : File Modification Date/Time : 2018:10:03 09:55:22-07:00 File Access Date/Time : 2019:03:28 16:51:00-07:00 File Inode Change Date/Time. It would’ve been nice if the filename contained some useful information like date, camera model, and maybe even location. Recently, I exported a whole bunch of files from Lightroom to a NAS share, and the filenames like 2E570434-67B7E0489CA2-39354-000017CF24DD8ACD.jpg are not very informative.
