ExifTool Forum

General => Metadata => Topic started by: neebah on August 18, 2020, 06:37:49 AM

Title: Directory Name based on tags in first file
Post by: neebah on August 18, 2020, 06:37:49 AM
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. 
Title: Re: Directory Name based on tags in first file
Post by: Phil Harvey on August 18, 2020, 08:34:30 PM
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