Discussion Locked

Batch File Not working

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This is a batch file that is successful, however it doesn't close the dos prompt when it is finished.

I tried :END, Exit but none close the window. System is win 95

@echo off
Y:CD\client\faxoutCALL LF3STAT.exe /I=@@@@LFAX.@TL /O=OUT.TXT /M=TCOPY y:\client\DONE.MRK y:\client\faxout\DONE.MRK"
:END

12 replies

by syscokid

1. End your .bat file with cls, that's one way.

2. Create a shortcut to the batch file, then go to Properties, and on teh Program tab, check "close on exut", then run the batch file from the shortcut. That'll work too.

by zalog

First create a shortcut to your batch file by right clicking on the BAT file and choosing Create Shortcut. Then right click the newly created "Shortcut to MS-DOS program" and select properties. On the Program tab check the Close on Exit check box and click ok. Now start your batch program using the shortcut. The window will close when the batch file completes.

If you are calling the batch program from another process be sure and have that process point to the shortcut and not the BAT file.

by volovoy

Start Windows explorer, find location of your batch file in system (I mean local or network hard drive), make right click on it, click on Properties, switch to Program tab, check Close on exit and click OK. That's it. Next time your DOS window will be closed automatically.

Good luck

This discussion is closed to new replies.