Sort by date taken - CMD utility

Bulk Rename Utility How-To's

Sort by date taken - CMD utility

Postby steve » Wed Sep 23, 2020 11:22 pm

Hi, I'm using the command line utility as part of a batch script to process photos from work each day.

In the GUI it is possible to first sort by date taken which works great when I have photos from multiple cameras. But I can't seem to get this to work in the CMD line utility. Is it possible?

Thanks in advance!
steve
 
Posts: 3
Joined: Wed Sep 23, 2020 11:19 pm

Re: Sort by date taken - CMD utility

Postby Luuk » Thu Sep 24, 2020 10:52 am

Greetings, the CMD utility cannot see inside the exif values for date taken sort, but it can sort by the dates modified, created, accessed, and for this to use /sortby:m, /sortby:c, and /sortby:a. If it must be urgent to sort by exif values, I must recommend the exiftool, and then to use it like "exiftool -fileorder datetimeoriginal ."
Luuk
 
Posts: 705
Joined: Fri Feb 21, 2020 10:58 pm

Re: Sort by date taken - CMD utility

Postby steve » Thu Sep 24, 2020 8:04 pm

Thanks very much, I will try that.
steve
 
Posts: 3
Joined: Wed Sep 23, 2020 11:19 pm

Re: Sort by date taken - CMD utility

Postby steve » Fri Sep 25, 2020 2:17 pm

In case anyone else was looking to do the same thing, here is the command I used, on windows, to rename all images in the directory by EXIF creation date:
Code: Select all
exiftool -ext jpg "-filename<DateTimeOriginal" -d %Y-%m-%d-%H-%M-%S%%-c.%%le .


In my case I am using it in a batch file which means the % symbols need to be escaped first like so
Code: Select all
exiftool -ext jpg "-filename<DateTimeOriginal" -d %%Y-%%m-%%d-%%H-%%M-%%S%%%%-c.%%%%le .


I just inserted this line in before the line from BRC64, because I already had a working (complicated) rename command, I just needed the files to be properly sorted first.
steve
 
Posts: 3
Joined: Wed Sep 23, 2020 11:19 pm


Return to How-To