Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

closing batch files in 2000

Status
Not open for further replies.

Dagk

Technical User
May 9, 2001
100
GB
Hi,
How do I automatically close a command prompt batch file window in Windows 2000. I used to be able to close them using the following commands in Windows 95:
echo off
cls
but these do not appear to work with Windows 2000. Any advice appreciated.

 
Just put "exit" at the end of the batch file without the quotes.

Dan
 
Hello, Dagk.

I guess the problem is that I am not sure what you mean by "automatically close a command prompt batch file window". Your commandline for win95 does not serve that purpose as what I understand! So you have to clarify before I might furnish you some elements for your consideration.

As to Exit,I think it is a big and common misunderstanding of what involves an "Exit" statement. Simply put, why do you need an "Exit" to end a batch file? The batch file will run its course and end by itself once all is over. Only under special circumstances where you need an "Exit" and it certainly is not to close a batch file window.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top