Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to Write a Bat file to run Bat files

wuming79wuming79 Member Posts: 1
Hi, I am trying to write a bat file, example, write.bat, that repeats running another 4 batch files, record.bat. Record.bat will generate a log file depending on how I name it. Example Record record1, Record record2, etc.

I wrote the following base on the above.

Echo on
record record1
Echo on
record record2
Echo on
record record3
Echo on
record record4

When I tried to run, I can only generate record1 and it goes back to A prompt. How do I write the bat file in such a way that I can get all 4 log files generated when I run write.bat??

Comments

  • pstsaipstsai Member Posts: 1
    Hi,

    I was asking the same question; and I think I found the answer. (It works for me.)

    try

    Echo on
    call record record1
    Echo on
    call record record2
    Echo on
    call record record3
    Echo on
    call record record4

    Ping-Sing

Sign In or Register to comment.