PDA

View Full Version : How do i do this?


master_lfs.5101
20th July 2008, 19:24
How do I make a single batch file run all of my servers?

bunder9999
20th July 2008, 19:38
START c:\lfs\LFS.exe /cfg=cfgfile1.cfg
START c:\lfs\LFS.exe /cfg=cfgfile2.cfg
etc
etc

cheers

Stefani24
22nd July 2008, 14:40
The START command isn't needed.

bunder9999
22nd July 2008, 15:13
The START command isn't needed.

without them, wouldn't they run one after another, as opposed to all at the same time? :shrug:

i haven't written batch in years since i became a linux user. :thumb:

the_angry_angel
22nd July 2008, 15:23
without them, wouldn't they run one after another, as opposed to all at the same time? :shrug:Yes. Traditional programs (i.e. non-forking (I've used the term forking quite liberally here, assume it means anything from an actual fork to a wrapper program)), such as LFS, do not return until they have finished executing. Since batch files work sequentially you cannot run a traditional program without using the start command.

Stefani24
23rd July 2008, 13:41
Oh sorry for giving you wrong information then.

master_lfs.5101
23rd July 2008, 16:18
k thanks. oh and do i need to start it with @echo off?

bunder9999
23rd July 2008, 16:19
k thanks. oh and do i need to start it with @echo off?

no, echo is purely optional.

Stefani24
24th July 2008, 16:32
What does @echo do?

master_lfs.5101
24th July 2008, 19:56
ohh i learnt that in batch programming. All batch files have to start with @echo off

bunder9999
24th July 2008, 21:44
ohh i learnt that in batch programming. All batch files have to start with @echo off

no they don't. :razz:

using @ hides the line from the screen during execution (essentially turning echo off for that line). "echo off" turns echoing off for the rest of the batch file.