what's wrong with my batch file?

what's wrong with my batch file?

Post by Jim Chen » Wed, 23 Jul 2003 06:39:09



My batchfile (myCompile.bat) includes the following three lines:

jjtree myParser.jjt
javacc myParser.jj
javac myParser.java

When I type the command "myCompile" in the DOS windows, only the first line
has been executed.

Could anyone tell me how to run all three commands (3 lines) in the batch
file?

Thanks!

Jim

 
 
 

what's wrong with my batch file?

Post by Ted Davi » Wed, 23 Jul 2003 08:37:24


On Mon, 21 Jul 2003 14:39:09 -0700, "Jim Cheng"


>My batchfile (myCompile.bat) includes the following three lines:

>jjtree myParser.jjt
>javacc myParser.jj
>javac myParser.java

>When I type the command "myCompile" in the DOS windows, only the first line
>has been executed.

>Could anyone tell me how to run all three commands (3 lines) in the batch
>file?

One of the alt.msdos.batch groups would be more appropriate, but your
question is both a FAQ (nobody wants to see it there yet again) and
trivial: use START to launch each command.



 
 
 

what's wrong with my batch file?

Post by Jim Chen » Wed, 23 Jul 2003 09:26:54


The START command seems working.
However, I would like to execute the three commands in sequence. For
example,
 the command "jjtree myParser.jjt" should be completed before the second
command "javacc myParser.jj" can start.

BTW, I would like that additonal DOS windows be closed automatically after
the batch file is completed.

Thanks!

Jim


> On Mon, 21 Jul 2003 14:39:09 -0700, "Jim Cheng"

> >My batchfile (myCompile.bat) includes the following three lines:

> >jjtree myParser.jjt
> >javacc myParser.jj
> >javac myParser.java

> >When I type the command "myCompile" in the DOS windows, only the first
line
> >has been executed.

> >Could anyone tell me how to run all three commands (3 lines) in the batch
> >file?

> One of the alt.msdos.batch groups would be more appropriate, but your
> question is both a FAQ (nobody wants to see it there yet again) and
> trivial: use START to launch each command.



.sig in the body)
 
 
 

what's wrong with my batch file?

Post by Ted Davi » Wed, 23 Jul 2003 21:44:20


On Mon, 21 Jul 2003 17:26:54 -0700, "Jim Cheng"


>The START command seems working.
>However, I would like to execute the three commands in sequence. For
>example,
> the command "jjtree myParser.jjt" should be completed before the second
>command "javacc myParser.jj" can start.

>BTW, I would like that additonal DOS windows be closed automatically after
>the batch file is completed.

Each program is responsible for closing its own window.  START syntax
varies with different operating systems.


SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.

 
 
 

1. Redirecting batch files from batch files doesn't work

Has anyone else noticed this?

The file hello.bat looks like this:

        echo hello world

Typing "hello.bat > hello.out" on the command line writes "hello
world" into the file hello.out as expected.

The file test.bat looks like this:

        hello.bat > hello.out

Running test.bat produces "hello, world" on the standard output and a
zero-byte hello.out file.  Bizarre, huh?

(4dos 4.02, dos 5.0, 4dos revision b, dos revision a)

(To give JP Software credit, BOTH of the above experiments in
COMMAND.COM produce the bizarre behavior.  At least 4dos does it right
from the command line...)

2. Cabletron bridging (Ethernet to Token-Ring)

3. ANSI function 'tmpfile' opens file in wrong mode

4. Emacs mode ???

5. Windows 95, batch files, 4DOS, wrong command processer

6. Undergrad research topic?

7. Can I put a 'timer'in a batch file?

8. sendmail 8.6.6.Beta8 available

9. program 'hangs up' when run from dos batch file...

10. Escaping '<' (redirect STDIN) in batch file

11. What's wrong with this BAT file?

12. Escaping '<' (redirect STDIN) in batch file

13. '|' key has wrong ascii code under msdos?!