PDA

View Full Version : Re: close the ms-dos prompt box


glee
May 6th 04, 05:21 AM
Make this the last line of your batch file:
cls
--
Glen Ventura, MS MVP W95/98 Systems
http://dts-l.org/goodpost.htm

"W Budd" > wrote in message
...
> I am backing selected files from one drive to another
> using dos xcopy in a batch file executee from the start-
> run selection. This works fine but leaves the ms-dos
> prompt box open on the desk top. If I include the
> text 'command /c' before the batch file name the box
> closes. This is what I want. Next I try to use the task
> scheduler to run the batch files, but if I include
> the 'command /c' before the batch file name the scheduled
> task will not run. This is very frustrating. I just want
> to execute the bat file using task scheduler and close the
> ms-dos prompt box. Any suggestions how to change the
> command line?
>
> Thanks - W Budd

J Yazel
May 7th 04, 04:06 AM
On Wed, 5 May 2004 04:48:52 -0700, "W Budd"
> wrote:

>I am backing selected files from one drive to another
>using dos xcopy in a batch file executee from the start-
>run selection. This works fine but leaves the ms-dos
>prompt box open on the desk top. If I include the
>text 'command /c' before the batch file name the box
>closes. This is what I want. Next I try to use the task
>scheduler to run the batch files, but if I include
>the 'command /c' before the batch file name the scheduled
>task will not run. This is very frustrating. I just want
>to execute the bat file using task scheduler and close the
>ms-dos prompt box. Any suggestions how to change the
>command line?
>
>Thanks - W Budd
====================================

Add "exit" (no quotes) as the last line of the .bat file.

Also make sure that in the Dos window properties
under "program", make sure that "close on exit"
is checked.

Jack