MajorGeeks Support Forums

Go Back   MajorGeeks Support Forums > ----------= PC, Desktop and Laptop Support =---------- > Software
Register FAQ Members List Calendar Mark Forums Read

Software Software such as operating systems like Windows XP, Windows Vista, Windows 7 etc., or specific programs.

Closed Thread
Thread Tools Display Modes
Old 06-01-12, 14:46
TimLANWAN TimLANWAN is offline
Private E-2
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default .bat to open random file

I need a batch file that will open a file at random. For example I can write a batch that will open all the files I specify in a list, but I want to list all the files out and then have the batch open only one and chose the file to open completely randomly. Then once the file is closed, I want the batch file to open another file on the list at random

Sponsored links
Old 06-01-12, 15:36
GermanOne's Avatar
GermanOne GermanOne is offline
Major Geek's Coding Genius Extraordinaire
Join Date: Feb 2009
Location: Thuringia / Germany
Posts: 361
Thanks: 6
Thanked 89 Times in 83 Posts
Default Re: .bat to open random file

Have a look at that thread:

Old 06-08-12, 23:32
Toadill Toadill is offline
Private E-2
Join Date: Jun 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: .bat to open random file

Here is a simple example
create a text file on your desktop
open it
In the below example the exe is M2Server
Once you enter the code
enter a name for the file and add the extension .bat
When you hit save it should create a new file that looks like a gear.
This will be your batch file and it should run just like an executable when you double click it.
@echo off
rem M2Server
cd C:\Mirserver\M2Server
start M2Server.exe
Old 07-03-12, 14:55
rehab101's Avatar
rehab101 rehab101 is offline
Private E-2
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: .bat to open random file

@TimLANWAN what kind of files are these? if they are executables thn you might be looking at a potential fork bomb..
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch program - How could i open a random image from a specified folder? syeuk2002 Software 3 04-29-14 14:05
Open a random file batch brunchmiracle Software 9 01-29-12 21:08
Excel File Windows Open at Random Sizes GatorDave Software 2 06-23-11 08:14
Random file??? HELP! zygmore Malware Removal 4 02-10-05 19:07
Get tons of random popups, even without explorer window open GMXMan Malware Removal 5 07-11-04 19:19

All times are GMT -5. The time now is 23:59.

MajorGeeks.Com Menu

MajorGeeks.Com \ All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ NEW! PC Games \ System Tools \ Macintosh \ Demonews.Com \ Top Downloads

MajorGeeks.Com \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds

All content Copyright source code Powered by vBulletin® Version 3.8.4
Copyright © 2009 vBulletin Solutions, Inc. All rights reserved.
Ad Management by RedTyger