A photo’s name should be its date.
An open source command line tool that renames photos by date taken.
Install-
DSC_0412.JPG2024-08-17_

09-15-33.JPG Camera -
DSC_0419.JPG2024-08-17_

20-37-46.JPG Camera -
IMG_2207.JPG2024-08-17_

07-42-10.JPG Phone -
IMG_2231.JPG2024-08-17_

19-51-04.JPG Phone -
P1030218.JPG2024-08-17_

13-08-51.JPG Second camera -
P1030244.JPG2024-08-17_

22-04-17.JPG Second camera
Biggest unit first, so it sorts
Year, month, day, then the time: sort by name and you get shutter order.
2024-08-17_
year
month
day
19-51-04.JPG
hour
minute
second
Once called IMG_2231.JPG, from the phone.
The shutter’s date, not the copy’s
- Date taken
- Written by the phone as the shutter fired. It travels inside the photo.
- Date modified
- The evening it was copied off the phone. Copies can change it.
Plain ls, in shutter order
Past midnight too, because the day comes before the hour.
$ ls -1 2024-trip
DSC_0398.JPG
DSC_0412.JPG
DSC_0419.JPG
IMG_2189.JPG
IMG_2207.JPG
IMG_2231.JPG
P1030201.JPG
P1030218.JPG
P1030244.JPG
$ whenshot 2024-trip
$ ls -1 2024-trip
2024-08-16_21-30-12.JPG
2024-08-16_23-58-40.JPG
2024-08-17_00-03-05.JPG
2024-08-17_07-42-10.JPG
2024-08-17_09-15-33.JPG
2024-08-17_13-08-51.JPG
2024-08-17_19-51-04.JPG
2024-08-17_20-37-46.JPG
2024-08-17_22-04-17.JPG
Try it on a copied folder first
$ install command to come
$ cp -R 2024-trip trip-test
$ whenshot trip-test
Source code: repository link to come