Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Converter - Configuration of output folder structure (Read 1676 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converter - Configuration of output folder structure

I can't figure how to set the "Output style and file name formatting" section of the converter such that it does what it want. Specifically, I would like that a subfolder is created for albums (defined as a set of at least two tracks for which %album% is identical), but no subfolder is created for everything else.

An example. Suppose I plan to convert four tracks. For tracks 1 and 2, %album% is A, for track 3, %album% is B, and for track 4, %album% is C. I would like the converter to place tracks 1 and 2 in folder OUTPUT_PATH\Album_Artist_of_A - A\. But I would like tracks 3 and 4 to be placed just in OUTPUT_PATH\.

If it's not possible to condition the output folder structure on the metadata of the files being converted, could I at least have the converter replicate the input folder structure in the output folder?

Again, an example. Track 1 and 2 are in D:\Music\Album_Artist_of_A - A\, tracks 3 and 4 are in D:\Music. How would I configure the converter such that it outputs tracks 1 and 2 into OUTPUT_PATH\Album_Artist_of_A - A\ and tracks 3 and 4 in OUTPUT_PATH\ ?

Hope my question is not too convoluted

Converter - Configuration of output folder structure

Reply #1
Quote
If it's not possible to condition the output folder structure on the metadata of the files being converted
It absolutely is, but just not in the way that you appear to want. Title-formatting considers a single file at a time, in isolation; context-sensitive behaviours based upon whether the current file shares metadata with one or more other files are not possible.

Quote
could I at least have the converter replicate the input folder structure in the output folder?
Yep. A quick search reveals results such as this: “[feature req.] Keep directory structure when converting.” (It needn’t be a request since it’s already present in the core functionality.)

Converter - Configuration of output folder structure

Reply #2
Quote
Specifically, I would like that a subfolder is created for albums (defined as a set of at least two tracks for which %album% is identical), but no subfolder is created for everything else.


not possible. foobar evaluates title formatting on a per track basic. what you're suggesting would require some sort of artificial intelligence.

Quote
If it's not possible to condition the output folder structure on the metadata of the files being converted, could I at least have the converter replicate the input folder structure in the output folder?


that's easier...

Code: [Select]
$substr(%path%,9,$len(%path%))


the 9 represents the length of

Code: [Select]
d:\music\


and uses everything after it.


Converter - Configuration of output folder structure

Reply #3
OP could set the Total Tracks tag for those singles to 1 (and set the respective total tracks tags for his other files as well, of course), then use $ifgreater or $ifequal to set the two different file name patterns:

Quote
$ifgreater(%totaltracks%,1,then,else)

$ifequal(%totaltracks%,1,then,else)


EDIT:

Also, re-creating the directory structure is a bit more nuanced than the thread db1989 linked to. See this post to get a general idea of how to replicate your directory structure: http://www.hydrogenaudio.org/forums/index....mp;#entry828951.

Converter - Configuration of output folder structure

Reply #4
Title-formatting considers a single file at a time, in isolation

I somewhat suspected that. Thanks for clarifying.

Code: [Select]
$substr(%path%,9,$len(%path%))

Thanks. (Just to point out in case someone else considering using solutions from this thread: this worked, but gave not so pretty-looking file names like foo.flac.m4a. That code snippet gives the general idea, though.)

OP could set the Total Tracks tag for those singles to 1.

Good idea. However, I wouldn't want to modify my tags that way. Sometimes I have an entire release (e.g., a four-track EP) and only wanna convert the "best" track from it. In my "logic," the converted track is now a single, so it should appear in the top of the folder structure, that is, in OUTPUT_PATH, not in its own subfolder. But I wouldn't wanna apply a total tracks tag of 1 to the original unconverted tracks for obvious reason.

Quote
Also, re-creating the directory structure is a bit more nuanced than the thread db1989 linked to. See this post to get a general idea of how to replicate your directory structure: http://www.hydrogenaudio.org/forums/index....mp;#entry828951.

Given that I cannot condition title formatting on multiple tracks at a time, I think the thread you linked provides the second-best (but feasible) solution. This works as expected for me, thanks!

Converter - Configuration of output folder structure

Reply #5
oops, i didn't think through what i posted properly. at least you got a better solution in the end.

 

Converter - Configuration of output folder structure

Reply #6
Why don't you make two identical presets and only change the output filename structure?
Name them something like MP3 (single tracks) / MP3 (album), then pick the one you need.

edit: after reading the question again, it seems you want it to just pick the behavior automatically, which makes my suggestion useless