Multiple -d options ??

Started by q159866, November 19, 2014, 01:26:13 AM

Previous topic - Next topic

q159866

Dear forum,

I want to move my files to a date-dependent directory with a exiftool-command like this:
exiftool "-filename<CreateDate" -d %Y/%Y_%m_%d/raw/%%f.%%e filelist

Now I would like to set some tags also in a date-dependent way like:
exiftool -IFD0:Copyright"<Copyright (c) $createdate Robert all rights" -d %Y

Can I do these operations in one command. My experiments like

exiftool "-filename<CreateDate" -d %Y/%Y_%m_%d/raw/%%f.%%e -IFD0:Copyright"<Copyright (c) $createdate Robert all rights" -d %Y filelist

were not successful, due to the restriction of the –d-option (can only be used once).

Any suggestions?

Cheers

Robert

Phil Harvey

Hi Robert,

This has been a fairly common question recently.  You can only use one -d option, so the other date/time value must be formatted manually.  One way to do this is via the advanced formatting feature:

exiftool "-filename<CreateDate" -d %Y/%Y_%m_%d/raw/%%f.%%e -IFD0:Copyright"<Copyright (c) ${createdate#;s/:.*//} Robert all rights" filelist

Here I start with an unformatted CreateDate in the copyright string (by adding a "#" after the tag name), then use an advanced formatting expression to remove everything in the date/time value from the first colon onwards.

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

q159866

Hi Phil,

thanks a lot for your help. It works perfectly now for me. :) :) :)


Cheers

Robert
---
Exiftool is a precious pearl in the endless sea of software.