Directory Name based on tags in first file

Started by neebah, August 18, 2020, 06:37:49 AM

Previous topic - Next topic

neebah

I have a bunch of folders that each contain a HEIC file, a JPG file, and a MOV file.  I would like to name each folder based on the datetimeoriginal, subsecoriginal, and offsetoriginal of the HEIC file. 

Phil Harvey

ExifTool will not rename folders, but you can  move files to a new folder like this:

exiftool "-directory<${datetimeoriginal}_${subsectimeoriginal}_${offsetoriginal}" -tagsfromfile %d%f.HEIC *.jpg *.mov *.heic

(change the date/time formatting to what you want for your directory name using -d and however you want the subsecs and time zone formatted)

- 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 ($).