How to move files based on more than one tag

Started by frenk, April 25, 2013, 10:33:06 AM

Previous topic - Next topic

frenk

Hi all,
i'm beginning with exiftool and now i have a problem. I want to move a file into a destination folder, based on file's metatags. For example i want to move an image in folder %Y/%m/model, where %y and %m are year and month of the metatag datetimeoriginal, and model is the value of the model metatag. My attempt is wrote below:

exiftool '-Directory<datetimeoriginal/model' -d %y/%m DIR

I get some strange error after the script's execution, so:

  • How can i fix my problem?
  • How do operators <, =, =<, +< work?
  • What's the exiftool's work when i modify the -directory metatag of some file?


Phil Harvey

First, if you are in Windows you should use double quotes instead of single quotes.

Second, the syntax is

   "-directory<$datetimeoriginal/$model"   (Windows)

or

   '-directory<$datetimeoriginal/$model'   (Mac/Linux)

The ExifTool "<" operator copies the value of one tag to another tag.  You can read about it in detail in the -tagsFromFile section of the ExifTool application documentation.

See this page for more details about writing the FileName and Directory tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).