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: Files sorting problem (Read 2576 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Files sorting problem

Hello.

There is one thing in Winamp that makes me still install it, despite I play music only on foobar - it's sorting of files on playlist. I use Winamp just as playlist generator for foobar, but it's annoying - I wanted to make something to let foobar sort files as Winamp does in one of it's options - "sort by path and filename". How to do it? Let me explain what I need exactly.

Let's have a look at some typical folder on my disk - it's named after artist and contains some tracks (single files) and some albums (directories - with names between [] parentheses) :

[Artist01]:
[bb album]
[dd single]
aa.mp3
cc.mp3
ee.mp3


I am strongly accustomed to the way I see it in Windows Explorer - files and directories are sorted directories are diplayed first, free files after them.  "Sort by path and filename" in Winamp makes something similar - the difference is that free files are first, directories goes after them and I find it reasonable. So Winamp will sort it like this:
aa.mp3
cc.mp3
ee.mp3
[bb album content]
[dd single content]

Unfortunately foobar makes something completely different when using "sort by file path" or when just dragging directory to playlist :
aa.mp3
[bb album content]
cc.mp3
[dd single content]
ee.mp3

What should I enter to "Sort By..." dialog to get equivalent of "sort by path and filename" from Winamp? And what should I write to "Sort incoming files by" dialog in "Shell integration" menu to get this by default?

Thanks for any help.

Files sorting problem

Reply #1
Did you try using %path_sort%? As I remember it is supposed to do just that.

What kind of files are those without a folder by the way? I usually give rarities/remixes/other related files a corresponding ALBUM tag and leave the DATE field empty. Everything else (ARTIST/GENRE/etc.) matches the official and properly tagged albums. That way the missing field can be used to keep them last in my Library/Playlist viewer. Would that help you or do you want to stick strictly to what you said?

Files sorting problem

Reply #2
What should I enter to "Sort By..." dialog to get equivalent of "sort by path and filename" from Winamp? And what should I write to "Sort incoming files by" dialog in "Shell integration" menu to get this by default?

Hmm... you might try:
Code: [Select]
$directory_path(%path%) - %filename%



Files sorting problem

Reply #3
%path_sort% was set in "Sort incoming files by" dialog in "Shell integration" menu and it didn't work.

BenB - looks like your expression works !! Thank you !!

I always feel little bit supid when I just look at "Syntax help" and I can't imagine how to use fields and operators to get what I need :/ . Well, maybe that's why I never wanted to be a programmer - that is not my level of abstraction.


Files sorting problem

Reply #4
$directory_path(%path%)
is the only syntax you need

Files sorting problem

Reply #5
After spending a considerable time observing the behaviour of my Playlists, I would like to give my report:

If you want to sort your playlists using the Winamp-style filesystem heirarchy,
$directory_path(%path%) %filename%    gives accurate results 100% of the  time,
$directory_path(%path%)    does not give accurate results 100% of the time.

 

Files sorting problem

Reply #6
Thanks