ExifTool Forum

ExifTool => Newbies => Topic started by: Meesh on January 06, 2022, 06:00:18 PM

Title: Sort into subdirectories not using date/time attributes
Post by: Meesh on January 06, 2022, 06:00:18 PM
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!
Title: Re: Sort into subdirectories not using date/time attributes
Post by: StarGeek on January 06, 2022, 06:03:34 PM
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.
Title: Re: Sort into subdirectories not using date/time attributes
Post by: Phil Harvey on January 06, 2022, 08:31:02 PM
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
Title: Re: Sort into subdirectories not using date/time attributes
Post by: Meesh on January 07, 2022, 10:24:44 AM
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