Need help with something basic...

Started by mjsmilloy, August 25, 2012, 05:25:51 PM

Previous topic - Next topic

mjsmilloy

Hello all, So grateful to find exiftool to help tame my too many GB of image files! To start I'd like to organize all my files into the following directory structure: /SORTED/{camera model}/{year}/{month}/{day}/{original filename with number added if duplicate}.{extension}

I've been trying lots of different things but nothing seems to work, like

exiftool -r '-Directory<${model}/%Y/%m/%d/%f-%c.%e' DIR

But nothing seems to work. Any direction very much appreciated!

Thanks,

Phil Harvey

What you have done is close.  Try this:

exiftool -r '-Directory<${model}/%{datetimeoriginal}' -d %Y/%m/%d/%%f-%%c.%%e DIR

(single quotes as above for Mac/Linux, or double quotes instead if you are in Windows).

Another problem is when your model names contain characters that you don't want in a directory name.  The solution for this is to tame the Model tag with a custom user-defined tag.  Here is one example, and here is another and here is maybe a better one.

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

mjsmilloy

Thank you very much for the help, Phil! I had kept plodding along and eventually came up with something similar but your solution is more elegant. It is churning away now through my GB of images, working like a dream! I don't think I'll run up against the character problem you cite but I will keep an eye out. Thanks for such a great tool....