CMD is disappearing by double clicking on bat

April 26, 2011 at 03:06:10
Specs: Windows XP
When i double click on bat file it is disappearing without any error & also it is not running at background also.....if i copy the command lines in to cmd it is executing the commands. any suggestion for this issue

See More: CMD is disappearing by double clicking on bat

Report •


#1
April 26, 2011 at 14:02:00
What command are you trying to run. Can you provide the contents of your bat?

If there is nothing left to run in your code, the file will exit. This is expected.

If you'd like the window to stay open, you can simply add "pause" to the last line of your code.


Report •

#2
April 26, 2011 at 20:45:37
I am trying to execute the below script. When i copy this to command prompt its working fine but when i double click it doesn't work

Goto START
@echo off
REM "Setting CAA Environment"

:START
For /R %F IN (*) Do (C:........)
FOR /R C:\Compare %F IN (*.xls) DO (IF EXIST ...........)
goto:eof
PAUSE


Report •
Related Solutions


Ask Question