quick batch filing question

mikekelly

New Member
Hi

I want to create a batch file to run multiple programs I have it set up as so...

@echo off
echo "title/action to be perfomed here
"C:\Program Files\file 1.exe"
C:\Program Files\file2.exe"
exit
dir c:\windows

I am using XP and have created a .bat file using notepad the problem I have is running the second application It wont actually run unless I close the first one down I have tried putting a semicolon and ampersand after file one but it wont follow on and open the second program.

I had a quick look on google and there plenty of info on batch files but not really concerning my problem

thanks in advance

Mike
 
its been a while since i did anything like this. this mithod is a bit more "untidy" but have you tried to make a batch file that points to each of the programs and having another batch file that points to each of those batch files and see if that does anything?
 
Hairy_Lee said:
its been a while since i did anything like this. this mithod is a bit more "untidy" but have you tried to make a batch file that points to each of the programs and having another batch file that points to each of those batch files and see if that does anything?

I just tried that there thanks but still didnt work, I maybe had the file path specified wrongly it was as follows.

"C:\Documents and Settings\mike\Desktop\test2.bat"

i used the above as a command to open the next .bat file but it didnt action properly.

I would think I should only need 1 file to run multi-programs I just need to command to make it follow on to line 2

regards
Mike
 
any advances on my last question guys/girls? what must I enter to run mulitple programs in one batch file.

after specifing 2 programs and 2 file paths only one program will work

any help would be great

Thanks
mike
 
try this, had a quick read of it and it seems plausable...

START Command

The START command can launch a Windows program either by specifying the program name (and its command-line parameters), or by specifying a data file name that is associated with a particular program (one that would automatically launch if you clicked on it in Windows).

For example, if you have NOTEPAD.EXE associated with all TXT files, then you could open the file SOME.TXT in any of the following four ways:

NOTEPAD SOME.TXT
SOME.TXT
START NOTEPAD.EXE SOME.TXT
START SOME.TXT


Why use one or the other? Well, sometimes you may have to use one particular form to get a result — depending, for example, on how the particular program is coded. Though the first form usually will work, you may want, for example, to write a more general batch file to open any particular program and associated file — without knowing what the requirements of all such files might be. You could, then, write a general batch file line such as START %1% %2%.

One particular use of the START command is to launch the default browser and go directly to a URL, for example: START http://google.com

You may use any of four command line parameters with the START command. These go after the word START, but before the program name:

/minimized or /m
/maximized
or /max
/restored
or /r
/wait
or /w

The first three determine the screen status in which the program opens. The last one forces the batch file to halt processing until the called program has finished executing. (This can be useful, for example, if you are loading multiple items in your windows Startup folder, and the nature of the programs require that one be finished before the next starts loading. Put them all in a single batch file, using the /wait parameter, and only put a shortcut to the batch file in the Startup folder.) Command line parameters of the START command can be combined in a single line. Example:

START /max /wait NOTEPAD.EXE SOME.TXT
i got this from HERE
 
Hairy_Lee said:
try this, had a quick read of it and it seems plausable...

START Command

The START command can launch a Windows program either by specifying the program name (and its command-line parameters), or by specifying a data file name that is associated with a particular program (one that would automatically launch if you clicked on it in Windows).

For example, if you have NOTEPAD.EXE associated with all TXT files, then you could open the file SOME.TXT in any of the following four ways:

NOTEPAD SOME.TXT
SOME.TXT
START NOTEPAD.EXE SOME.TXT
START SOME.TXT


Why use one or the other? Well, sometimes you may have to use one particular form to get a result — depending, for example, on how the particular program is coded. Though the first form usually will work, you may want, for example, to write a more general batch file to open any particular program and associated file — without knowing what the requirements of all such files might be. You could, then, write a general batch file line such as START %1% %2%.

One particular use of the START command is to launch the default browser and go directly to a URL, for example: START http://google.com

You may use any of four command line parameters with the START command. These go after the word START, but before the program name:

/minimized or /m
/maximized
or /max
/restored
or /r
/wait
or /w

The first three determine the screen status in which the program opens. The last one forces the batch file to halt processing until the called program has finished executing. (This can be useful, for example, if you are loading multiple items in your windows Startup folder, and the nature of the programs require that one be finished before the next starts loading. Put them all in a single batch file, using the /wait parameter, and only put a shortcut to the batch file in the Startup folder.) Command line parameters of the START command can be combined in a single line. Example:

START /max /wait NOTEPAD.EXE SOME.TXT
i got this from HERE


Thanks for your time mate :)

Mike
 
Back
Top