Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: I need a batch file to open a random file within a certain folder/path

I need a batch file to open a random file within a certain folder/path

I want a batch to select and open a random link file in a folder i have. All the links are music videos I like to listen to, and I kind of want to just have an option for 'surprise me!'.
I can change the file names if I have to, and I have a basic batch file ability. I know the simple commands, but nothing of the variables, signs-involving commands (&%!?), etc.

Also, I want to learn a whole lot more about programming/java/batch file, so it'd be awesome if any code could be explained. Thank you, in advance

I can try the autoit script, i saw it a while ago when I did a different batch file mission, but I knew it wouldnt work for my purpose and I didnt even try it then.

C:\Users\Owner\Desktop\MineMusic is the folder path and the files in it are a collection of random song names. I have probably 50-100 in it, but I dont really care about the file names if i just make it all random. They are .url internet shortcuts, btw.

We all get stuck when trying to do something the first time. But if you are interesting in programming the key is to get a simple version to work or nearly work. This gives you a test bed to learn how to do the new or difficult thing. Once you understand how it works you may just fix the program or come up with a better design. Programming is all about learning curve. To progress you need to be willing to absorb some.

I need a batch file to open a random file within a certain folder/path

Cannot Open File...The system cannot find the path specifiedHello, could somebody please help me?
So background story here: I have a SSD for boot and applications, and a HDD for storage. I recently changed my "Location" for Pictures, Movies, Documents, and also Downloads. I changed the "Locations" to my 1TB HDD. I did not make a junction, I just created...

General Discussion

Batch file to open multiple browsersHello, I need 10 different browsers open and after some searching found a way to write a batch file which worked but with a couple of problems.
The problem is it opens them all at once and several of the browsers crash. So I tried adding a ping after each one as follows:
@echo off
start /D...

Browsers & Mail

Batch File that grabs file names from folder to insert into batch fileOk I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused:
First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.
Here's the code that I'm using:
ffmpeg -i...

General Discussion

batch file open file for program in the startup folderI have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the...

General Discussion

Batch file to create a folder with name of the time.I'm trying to write a batch file that when run creates a folder named "Backup" followed by the time it was created, and then copies files to that folder.
When I run
md "C:\Users\MasterControlProgram\Documents\MC Server With Backup\Backups\Backup %DATE%\"
xcopy /e /v /y...

Backup and Restore

Batch File to Open ALL Links in FolderI have a few LNK files in the same folder and would like to write a batch file that opens all of these links without explicitly having each link listed in the batch file. Is there a way to open all links in one folder? I would presume so, considering Windows has for the most part always had a...