Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!!! Why won't this Batch file Run? 1

Status
Not open for further replies.

aldyofclas

IS-IT--Management
Jul 12, 2001
4
0
0
US
Hello Experts,

I am trying to get this batch file to run but it seems to keep stopping after the del *.* and asking "Are you sure you want to delete yes or no". How can I add "yes" automatically so that I don't have to remote onto the server to manually press yes each time. Your help would be greatly appreciated.

Thanks,
Aldyoflcas

Batch file is listed below:

@echo on
H:
cd \rlmdata
del *.*
cd response
del *.*
cd ..
cd claims
del *.*
cd ..
rd response
rd claims
xcopy h:\lmdata\*.* /s h:\rlmdata\*.*
echo on
echo on
echo on
echo on
echo
echo
echo
echo
echo
!!!Check for data files copied !!!!
 
To do so, replace all your

del *.*

lines by the following :

echo.y|del *.*

regards - tsuji
 
Also, try using 'del *.* /q' for quiet mode (this does not prompt for confirmation)
 
Also, try using delete *.* /y instead, this will auto answer yes to the question without stopping the batch file.


Anyway I think you already solved... right? Technically... ¡Everything is possible!


Biohazard
 
Just a side-remark. If you prefer del 8.8 /q to echo.y|del *.*, you too have to be informed that del /q is domestic to nt/2000 and would fail in other win or dos series.

regards, - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top