Batch file to play random file

Danimal1q2w3

Honorable
Dec 4, 2013
356
1
10,860
hey everyone!!

I have a folder full of subfolders each containing video files. I would like to be able to watch a random episode from a random season and have it open in Mpc-hc.

All the files are mkv extension

Running win 7 pro x64

Would be even better if it generated a playlist, and opened that playlist into mpc-hc... Say maybe 20 episodes long. I don't see myself watching more than that in one sitting ever.

Thanks for looking
 

tigerg

Honorable
Feb 24, 2013
1,013
0
11,660
Hmmm, then this might be difficult for you to make.

But here is the idea... you need some logic to traverse file and directory listings, counting the files and perhaps save the file names in a table, generating a random number, and then linking that random number to a list of files/directories.

You'd also have to figure out how to launch the media player at the command line with the appropriate arguments to load the specified file, but that part should be pretty easy to look up.