Microsoft KB Archive/33125

Suppressing Extra MS-DOS Prompts Following End of a Batch File PSS ID Number: Q33125 Article last modified on 03-24-1993 PSS database name: O_MSDOS

3.x 4.x 5.00 6.00

MS-DOS

Summary:

When a batch file terminates, it may produce an extra blank DOS prompt on the line above the current DOS prompt (the one with the flashing cursor).

To work around this problem, make sure that a CTRL+Z character (ASCII value 26 decimal, 1Bh hexadecimal, often symbolized as ^Z) immediately follows the last character of the last command in your batch file.

For example, to avoid producing an extra blank DOS prompt in a batch file that executes a program called GOFAST, you would create the following batch file with EDLIN:

New file *i

1:@echo off 2:echo This batch file calls the program GOFAST 3:GOFAST^Z 4:^C


 * e

To enter a CTRL+Z character using EDLIN, press the F6 key. The F6 function key also produces this character from the MS-DOS prompt, so you can use it if you are creating the file using COPY CON.

Additional reference words: 3.x 4.00 5.00 6.00

Copyright Microsoft Corporation 1993.