Batch File to exit a .cmd file

Hewlett-packard / Dx2000
May 31, 2010 at 23:35:22
Specs: Windows XP, 2GB
Hi,
I have a created a file with extension .cmd in
that i have given the following code

@ECHO OFF
cd Library
DeviceIndexGenerator.py
ECHO DeviceIndexGenerator
>>DeviceData.txt

Here i'm running a python file in the
C:\..\Library path and creating a dump txt file
called DeviceData.txt, now all i want is when
the first time i run the .cmd file i should be
able to dump the .txt file and when the second
time if i run the same .cmd file it should check
the .txt file in the path and if it is available the
.cmd file should exit withour running the script.
This is very urgent, please help me.

Thanks in Advance. :)


See More: Batch File to exit a .cmd file

Report •

#1
June 1, 2010 at 02:33:32
@ECHO OFF
cd Library 
if exist DeviceData.txt exit
DeviceDataDeviceIndexGenerator.py 
ECHO DeviceIndexGenerator >> DeviceData.txt


Report •
Related Solutions


Ask Question