Discussion Locked

Batch file close window command

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I've set up a batch file to perform a few simple tasks for our secretary and students, but the DOS window remains open after the batch file executes. Does anybody know the command to place at the end of the batch file that will close the window onceeverything has finished running? Thanks!

5 replies

by shanghai sam

Locate the batch file in my computer. Click to highlight, right click choose properties, click program tab, click close on exit.

Hope this helps,

Mark

by shanghai sam

Hi there,
To exit or to close the DOS window just do the following things :
-> Open your batch file in Edit mode
-> Type @echo off on the first line
Save and exit and now try to run the batch file..
You will see it closes the window..
In case it doesn't close type exit then use Start->Run->Browse and locate your file and then run from there.
Enjoy

by shanghai sam

I had to ask someone for a little help on this one too. If the above answers don't work for you this one will.
Say your batch file is close.bat. Now what you need to do is right click on that file in windows explorer (close.bat)and click create shortcut. Now you will have a file called shortcut to close.bat (by the way you can rename this afterwards if you want). Right click on shortcut to close.bat and choose properties and in the properties box choose program tab and look for close on exit and check that box and click ok and run your shortcut to close.bat and it will work.
I've done a couple of batch files this way and it closes all the time.
Keep on computing.

by mike o

Hi guys,

Apparently this "user deleted" business is keeping me from giving you points, but I just wanted to say thanks for your responses, they were helpful!

This discussion is closed to new replies.