Thanks so much for your response. I tried your method of creating an *.m3u from the root directory folder, and although that autoexpands all the folders, the random track selection still seems to follow the same pattern as if all of the folders were not expanded, and this method also makes vlc very unstable - it crashes often, most likely because the root folder I am using contains so much media - about 400GB of music.
Ah OK. One way would be to make a playlist that lists all of the files (not them as directories). Then VLC would treats each item separately from the start.
Have you tried using the Media Library? You'll have the same issues with folders, however you could try adding (as a one time thing) a giant playlist with everything in it (each entry corresponding to a file, not a folder), then when you re-open VLC is everything should still be there. Everything will be contained in a single folder (the same name as the playlist), but everything should be there. The meta-data won't be loaded until a track is played however, it's remembered are closing and reoping VLC though. Then you could use the search, select tracks, right click and "Add to playlist" if you want a custom order/set of files.
I tested this with 12000 items, ~115GB in size so shouldn't cause a crash (haven't tried with 400GB though). I used foobar2000 to create the *.m3u playlist file BTW (just make a giant playlist in that then export it).
As solazy said you could also do something similar in VLC by exporting a fully expanded playlist to a playlist file etc.
As an example of the original problem. Take six folders, each with an album full of tracks. Drag those six folders into the vlc playlist and click random and play. You will notice that the first track chosen will have it's folder expanded and the other five folders remain closed. Because the open folder has so many more entries in the list, the next track will most likely be one within the same folder. If another folder does get chosen, the odds of a third are even less. With a few trials of this you will definitely notice it. It becomes very obvious with large numbers of folders.
Yeh I see what you mean now.
You could make this feature request - e.g. to "Automatically pre-parse/expand (prior to playback) folders when added to VLC's Playlist/Media Library". Otherwise/in the meantime you could try using the Media Library/creating playlists with each entry as a file instead of a folder.
Cheers, Arite.