Columns UI in Foobar
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:
$puts(substring,$substr(%path%,$add($strstr(%path%,Music),6),60))$substr($get(substring),1,$sub($strchr($get(substring),\),1))
Let me add a short explanation. What it does is:
$add($strstr(%path%,Music),6)finds the first occurence ofMusicin 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 afterMusic\and ending somewhere at the 60th character (the exact end doesn't matter as long as it includes the folders nested one level inMusic).- The
$putsstores that substring in a substring variable for future use. - Then
$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.
Enjoy. :D
Tweet
Share
Link
Send
Send
Pin