Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file not working  (Read 4139 times)

0 Members and 1 Guest are viewing this topic.

rose0001

  • Guest
Batch file not working
« on: August 14, 2004, 11:50:55 AM »
Hello,
I'm trying to find a way to start two or more programs with one click (can't find way to do it with shortcuts in Windows XP...is there a way?). Therefore, I decided that a batch file might be the way to go (it's been a long time since I've worked with them). To try it out, I've created a simple batch file:

cd\
c:\progra~1\tapecalc\tapecalc.exe
c:\windows\system32\notepad.exe
exit

Simple enough. However, the third line of the batch won't execute until I close the program opened by the second line. I'd like both programs to open at the same time and then for the DOS window to close. Can someone advise what I've done wrong and how to fix? Thanks.

2k dummy

  • Guest
Re: Batch file not working
« Reply #1 on: August 14, 2004, 12:43:48 PM »
Use the format

@echo off
for %%c in (notepad.exe notepad.exe) do start %%c

Of course is batch only opens 2 instances of notepad. This also assumes you are using W98.

johnwill

  • Guest
Re: Batch file not working
« Reply #2 on: August 14, 2004, 01:33:45 PM »
You could also just add a start to each line, no need for the FOR loop...

cd\
start c:\progra~1\tapecalc\tapecalc.exe
start c:\windows\system32\notepad.exe
exit

rose0001

  • Guest
Re: Batch file not working
« Reply #3 on: August 14, 2004, 05:20:38 PM »
The start command worked. Thanks much.