Pass model in the directory affectation

Started by fred, May 10, 2020, 09:03:39 AM

Previous topic - Next topic

fred

Dear All
I've been using exiftool on my Debian since ages, but always with the date and time values while moving files
I want now to pass the model name as a value for directory affectation

initial call was :
$exiftool -o . -ext JPG '-Directory<CreateDate' -d /IMAGES/%Y/%m/%d/ . -r 2> log.txt

*wrong* new call :
$exiftool -o . -ext JPG '-Directory<Model/CreateDate' -d /IMAGES/%Y/%m/%d/[%model ?]/ . -r 2> log.txt
Thanks for your help !
Frédéric

Phil Harvey

Hi Frédéric,

Close.  Try this:

exiftool -o . -ext JPG '-Directory</IMAGES/${Model;}/$CreateDate' -d %Y/%m/%d -r . 2> log.txt

Here I have added the default advanced formatting expression for Model to remove any invalid characters from the model name.

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

fred