Sorting images and videos by date and camera

Started by trbc, March 16, 2018, 11:25:19 PM

Previous topic - Next topic

trbc

Having recently moved from macOS to Windows, I'm trying to undo the mess I created by using Apple Photos and iCloud Photo Library for the last few years. The short version of the story is that IPL contains images and videos taken by multiple iPhones and other cameras. I used an app and a script to download everything from iCloud onto local storage, and now I want to sort them by the date they were taken and the camera used to take them. I want the filename to be the date and time the image was taken, with a counter at the end in the case of bursts. Ultimately I'm looking for something like this:

2018/
   2018-01/
      2018-01-12/
         iPhone 8 Plus/
            2018-01-12_12-20-58.heic   # iPhone camera output
            2018-01-12_12-20-58.jpg    # generated by transfer app
         NIKON D5300/
            2018-01-12_13-34-45.nef


So far I've been completely unsuccessful at getting anything to work. To make matters worse, it doesn't appear that the HEIC files have a create date, but the derived JPG files do. Can anyone point me in the right direction?

Thanks in advance!


Phil Harvey

> exiftool -time:all -a -G1 -s ../pics/depth-photo.heic
======== ../pics/depth-photo.heic
[System]        FileModifyDate                  : 2017:09:30 09:36:03-04:00
[System]        FileAccessDate                  : 2018:03:17 08:59:58-04:00
[System]        FileInodeChangeDate             : 2017:09:30 09:36:03-04:00
[IFD0]          ModifyDate                      : 2017:07:14 11:27:18
[ExifIFD]       DateTimeOriginal                : 2017:07:14 11:27:18
[ExifIFD]       CreateDate                      : 2017:07:14 11:27:18
[ExifIFD]       SubSecTimeOriginal              : 179
[ExifIFD]       SubSecTimeDigitized             : 179
[ICC-header]    ProfileDateTime                 : 2015:10:14 13:08:57
[Composite]     SubSecCreateDate                : 2017:07:14 11:27:18.179
[Composite]     SubSecDateTimeOriginal          : 2017:07:14 11:27:18.179


My HEIC sample has a CreateDate.  Use the command above to see the available date/time tags in your file.

Then see the renaming files page for details and examples renaming files.  Post back if you have any questions.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).