Hello,
with this command I can copy and rename my photos recursively in a nice and practical way:
exiftool -r -o DummyDir/ '-filename</media/user/nikon-test-global/${DateTimeOriginal}_${ImageSize}_${Model;}%-c.%le' -d '%Y.%m.%d-%H-%M-%S'
But I want to copy all photos according to the 'DateTimeOriginal' 'model' etc., rename them and sort them into year folders. Regardless of the camera, just chronologically by year.
exiftool -d %Y '-directory</media/user/nikon-test-global${DateTimeOriginal'
or with:
exiftool -r -o DummyDir/ '-filename</media/user/nikon-test-global/${DateTimeOriginal}_${ImageSize}_${Model;}%-c.%le' -d '%Y.%m.%d-%H-%M-%S' . > exiftool -d %Y '-directory</media/user/nikon-test-global${DateTimeOriginal'
The command sorts roughly how I want it, but the photos get a number in each year folder from 0-x. Can the two commands be merged into one command so that I can copy, rename and globally number all photos?
Thanks in advance
P.
Use the DateFmt helper function (https://exiftool.org//exiftool_pod.html#Helper-functions) and the hashtag version of the -n (--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv)
Test this to make sure it's right, then change Testname to Filename
exiftool -r -o DummyDir/ '-TestName</media/user/nikon-test-global/${DateTimeOriginal#;DateFmt('%Y')}/${DateTimeOriginal}_${ImageSize}_${Model;}%-c.%le' -d '%Y.%m.%d-%H-%M-%S' DIR
Here is an improvement suggestion:
When I aggregate photos from the same event (e.g. a day in a trip, where I took photos a Nikon camera and a Pixel phone), I copy all the event's photos to one folder and run the renaming there. This requires running ExifTool once for each camera/phone. Not a big deal.
In the rename commands, after the date-time part, I add a short name of the device (e.g. ND5 for Nikon D500, P8 for Pixel 8, etc., as I don't need the full camera name as recorded in the metadata) and then the name of original photo, so I can easily correlate the renamed photo to the original one.
So I will get these new names:
2025-01-30_10_05_59-ND5-DSC_1234.JPG
2025-01-30_10_05_45-P8-PXL_20250130_100545287.jpg
I will post later the exact procedure that I use.