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: Grouping like Windows Explorer, folders on top, loose files on bottom? (Read 1388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Grouping like Windows Explorer, folders on top, loose files on bottom?

My audio is sorted by "genre/subgenre/artist-album-directory/track.flac" for full albums, and "genre/subgenre/track.flac" for loose files. It looks something like this in Windows Explorer:

[Electronic]
[Jazz]
+--[Funk]
+--[Jazz Manouche]
+--[Swing]
+----[A-album]
+------A-track1.flac
+------A-track2.flac
+----[B-album]
+------B-track1.flac
+------B-track2.flac
+----[X-album]
+------X-track1.flac
+------X-track2.flac
+----Swing-track1.flac
+----Swing-track2.flac
+--[Various]
[New Wave]

Now in FB2K I sort/group my playlist by %directoryname% (both as a column and as a group), and when I drop the "Swing" folder in there, it gets sorted alphabetically, by parent directory:

[A-album]
--A-track1.flac
--A-track1.flac
[B-album]
--B-track1.flac
--B-track2.flac
[Swing]
--Swing-track1.flac
--Swing-track2.flac
[X-album]
--X-track1.flac
--X-track2.flac

... I would like to have the loose tracks sorted on bottom, exactly like in Windows Explorer. I tried my luck with group formatting like $directory(%path%,2)/%directoryname%, $longer(...), and similar hacks, but that either just moves everything up one step in the hierarchy or does some other, unexpected things.

Would it be actually possible to achieve what I want in grouping? If so, I'd be grateful for any hints.

Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #1
Grouping and sorting are two different things. Instead of us guessing at where and what you are speaking of, how about posting a screenshot so that no one wastes his/her time trying to play pin the tail on the donkey with your problem?

Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #2
if you have some way to identify those loose tracks as being different to other tracks it should be possible.

this example script shoves all tracks without an album tag to the end....

Code: [Select]
%artist%|$if(%album%,%album%|%filename%,$char(8238)zzz$repeat($char(8195),100)$char(8237)%filename%)



Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #3
BenB, I thought I made it clear enough, but anyways, same as I wrote above:



Groups are by %directoryname%, and I click on the Folder column on the right, which is %directoryname% too, to sort them alphabetically. The (sub)folders you see are all in /Klezmer/ (/Klezmer/Giora Feidman..., /Klezmer/Koby Israelite..., /Klezmer/Kol Simcha...) The two loose tracks in the middle of the screenshot are in /Klezmer/ too, without any subfolder.

I want those two to be at the bottom of the list, not alphabetically ordered like the rest. Like in Windows Explorer:



---

marc2003, thanks for the script, I was trying to get that working without tags, just by folder/file. Many of those loose files do have album tags, but I only kept some tracks I liked from that album. I guess just removing the album tag might be a good solution.

Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #4
other than messing around adding custom tags to the loose files (or setting ratings with foo_playcount), i don't think there is anything else that can be done.

Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #5
Well, it is a sorting issue and, considering your response to marc2003, I'll assume you're populating that playlist with Album List which sorts according to its nodes.

marc's script should work if it's modified to compare album with the directory like so:

Quote
%artist%|$if($strstr(%directoryname%,%album%),change this to whatever it is you use now for tracks within album folders,$char(8238)zzz$repeat($char(8195),100)$char(8237)%filename%)

EDIT:

The script depends upon those tracks within album folders to have album tags because it checks if the parent folder's name contains the album's name. If you have disc folders within album folders, then the script will have to be modified to work correctly, There's no substitute for properly tagged files and a uniform directory structure.

Grouping like Windows Explorer, folders on top, loose files on bottom?

Reply #6
I forgot to mention that the directory/album name comparison is case-sensitive. The case of the album's name in both places must match.