Here's what my Foobar interface looks like now:
I had a "Music" folder somewhere on disk C:/ with music files divided into categories inside:
And I wanted a filter column that would reflect that folder structure, as can be seen on the first screenshot:
I couldn't find the recipe online, so I wrote one myself. Here it is if you're struggling to do something similar:
Let me add a short explanation. What it does is:
$add($strstr(%path%,Music),6)finds the first occurence of
Musicin the file path (
%path%) and adds 6 to the found index to account for the word and the slash that follows.
$substr(%path%,$add($strstr(%path%,Music),6),60)extracts a substring from the file path, starting right after
Music\and ending somewhere at the 60th character (the exact end doesn't matter as long as it includes the folders nested one level in
$putsstores that substring in a substring variable for future use.
$substrcreates a substring from that variable (
$get), starting at index 1 and ending at the first found slash in the variable (
$strchrpart) minus one (to get rid of the slash itself.