VLC Autoplay Next File in Folder

So I wanted to do exactly what the title of this post implies.  I have many folders with media in them, sorted quite nicely, but I wanted an easy way to play them in order automatically by just running a file.  For instance, if I wanted to play all the files within my folder, “Public Domain Totally Legal Video Season 1”, I could do that without fiddling much with playlists and such.

I found a GPL extension that somebody made called “Add Similar” and it was SO CLOSE to what I wanted.  You ran a file, clicked the extension, and it automatically added similar files from that folder into the VLC playlist.  Problem was, it was all random.  I modified it a bit, adding a table.sort and a vlc.playlist.sort(‘title’) function to the LUA file and I’m pleased to report it works like a champ!

To use this, download the LUA file here, then drop it in your VideoLan\VLC\lua\extensions folder.  Open a media file, then when it opens in VLC, click View and choose “Add Similar With Sort”.  It’s that easy.

Enjoy!