Creating nested folder structure based on multiple tags in flac files

Started by ejbrownlf, September 03, 2022, 12:09:23 PM

Previous topic - Next topic

ejbrownlf

I have a a large amount of flac files that are completely unorganized. I'd like to create a script that would sort them in a Parent folder of the Artist name and have sub folders within each artist for their albums and put each song in those album folders

exiftool '-Directory<${Artist}/$Album' z:/Music/Artists/ z:/flac
This is what I wrote but unsure if this will actually do what I am trying to do.

Thanks for any help

StarGeek

Change Directory to TestName and then run the command.  Exiftool will tell you what the new directories will be called without actually moving the files, though you will get warnings that about the file already existing.  That's because TestName is checking file names, not directories.

If the output looks correct, then you can run the command for real.

The command you list will check all the files in both "z:/Music/Artists/" and "z:/flac", but not any subdirectories.  Is what you actually want to do is move the files from "z:/flac" into "z:/Music/Artists/"?  If that's the case, you want to put the target directory before ${Artist}.

Also, because there might be slashes or other characters in the Artist or Album that might not be legal for a file name, then a semicolon needs to be added in the tag name.  Without it, then a name like "AC/DC" will create a new directory.  You would end up with a path like "z:/Music/Artists/AC/DC/Highway To Hell/file.flacc"

So I think you want
exiftool '-Directory<z:/Music/Artists/${Artist;}/${Album;}' z:/flac

If you need to read subdirectories as well, add the -r (-recurse) option.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype