Sort into subdirectories not using date/time attributes

Started by Meesh, January 06, 2022, 06:00:18 PM

Previous topic - Next topic

Meesh

Basically I'm hoping that there is a way to create directories and subdirectories based on attributes other than date/time.

I envision something like this:

exiftool (options) "-directory<artist" "-directory<album" .

Since -d only works with date/time stamps to define the subdirectories I'm kinda stumped.

If possible I could also execute these separately, first creating the artist directory:
exiftool "-directory<artist" .

then recursively executing for the album. 
exiftool -r "-directory<album" .

However, I can't find a way to change the absolute path, so all the album directories are created at .

Thanks all!

StarGeek

Try
exiftool "-Directory</path/to/$Artist/$Album" /path/to/files/

Files that don't have both an Artist and an Album will not be moved.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

I suggest using the advanced formatting feature to remove any characters that are illegal in directory names:

exiftool "-Directory</path/to/${Artist;}/${Album;}" /path/to/files/

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

Meesh

Thanks for the quick reply and it works great!!

I spent hours banging my head against the wall; I should have asked before I got the goose egg.  ;D

Thank you so much!
Meesh