YOU ARE ABSOLUTELY RIGHT, MARCS41, the program did HANG and that's why it wouldn't close! However, I have other problems.
BACKGROUND: The .bat program is supposed to fix another program by getting rid of a corrupt file and replacing it with an uncorrupt one. When I got here, the program no longer worked.
The DOS window pops up and says:
"Please wait, fixing DATASHT.DWG . . .
1 file(s) copied.
Could not find G:\DATA\DWGS\PLOT\file*.*"
and this hangs so that the DOS window doesn't close.
The original batch file is as follows:
:*******************************************************
: Batch file used to fix datasht.dwg in TAKEOFF program
:*******************************************************
@echo off
cls
echo Please wait, fixing DATASHT.DWG . . .
map g: = sys:apps\takeoff.r13 > nul
g:
if exist *.tmp del *.tmp
copy g:\apps\takeoff.r13\dwgs\datasht.dwg
cd\data\dwgs\plot
del file*.* > nul
f:
cd\temp
del *.* > nul
cdmap g: = sys: > nul
********************************************************
I didn't understand this code so I altered it and wrote my own, as follows:
:*******************************************************
: Batch file used to fix datasht.dwg in TAKEOFF program
:*******************************************************
@echo off
cls
echo Please wait, fixing DATASHT.DWG . . .
g:
map g: = sys:apps\takeoff.r13 > nul
if exist *.tmp del *.tmp
copy g:\apps\takeoff.r13\dwgs\datasht.dwg
cd\data\dwgs\plot
del *.dwg
f:
cd\temp
del *.dwg
cdmap g: = sys:
*********************************************************
It now closes out ok, but I altered the code so much, not knowing what I am doing. My question is: what is this "> nul" command? I've looked in my books and nothing describes it, so I deleted it, because that is what originally hung. I really want to delete ALL the files (*.*) but when I put that in the code, it hangs again. This time it prompts me by saying "Are you sure you want to delete this? [y/n]" How do I get rid of this? I tried the switch "del *.* /y" but I get an error message. Anyway, if this is too much trouble, I'll just leave it like it is (I'm just not sure it will work like it is supposed to).
Thank you for your help. I'll understand if this is too tedious for you to follow.