Was wondering if there was an easier way vs naming files 1, 2, 3, 4, 5, 6, 7 .... to launch an executable with random file appended to it within " " to when running an EXE have it pick from any number of many files at random. I right now can do this all in C++ with file names that are numbers. With C++ I can concatenate the random number output generated to .mp3 for example and then perform a system call to the player.exe "4.mp3" for example to play the 4th file named 4.mp3. But I'd like the files to all keep their original file names without having to rename all files to numbers.mp3 since sometimes I want to manually go in and launch a file to listen to and navigating in a folder with numbers without a list of what is what it is all a mess of unknown.
I was wondering rethinking all of this if this could be done in Batch maybe where DIR can be used to append file name / extension to a text file and then at random read in one of the files listed in the DIR output, calling to say line #8. So it launches whatever file name is the 8th down on the list. *Only the music files for example will be located in this folder and so there is no risk of calling to a non supported file type by the player.
iTunes isnt a solution for a random shuffle of music because this will be for more than just MP3 files, but also for video file formats when I want to watch something at random from say folders that are categorized so say i want to watch an action movie but cant make up my mind, I run this and it picks from the list at random and I watch it, or if i am not in the mood for whatever movie, I can run it again and it picks the next movie at random.