[AccessD] OT: Create .bat in WinXP Pro

Penn 227 penn227 at yahoo.com
Tue May 3 08:29:30 CDT 2005


Thank you all very much for all your help.  I believe
the problem was that 
'Run Cmd' is not necessary in the batch file.  Since I
had been putting it 
in as the first command, it opened a DOS window and
then hung.  FYI, here is 
the final version I came up with:   There is probably
something more elegant 
than using REM and PAUSE to tell me the file isn't
there but this works.  I 
created another one just like it to go the other way
(i.e. remove the 'X'). 
I had one that did both depending on what it found but
it got confusing 
trying to remember which version of the file name I
had on the computer.

if not exist c:\DevFileX.txt goto NOFILE
c:
cd \
ren DevFileX.txt DevFile.txt
GOTO END
:NOFILE
REM File does not exist.
PAUSE
:END


Note: In the sample that Jim sent below, you need to
leave a space between 
the change directory command ( cd ) and the backslash
( \ ).

> if not exist c:\DevFileX.txt goto end
> c:
> cd\
> ren DevFile.txt DevFileX.txt
> :end


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the AccessD mailing list