Need quick help with a DOS batch file


New member
I'm creating a .bat file for backing up all of my game saves. Everything works properly, but when I'm deleting the entire contents of a directory (to then be filled with new files) I get a prompt in the DOS window asking if I really want to delete all files. I know this prompt doesn't come up when deleting single files, only multiple files. Is there a command that can be inserted into the batch file to automatically delete all files in a directory without prompting me for confirmation?

This is Win98 by the way.
at the end of the copy command try adding this line

> nul


copy c:\games\data\*.dat a:\ > nul
I know this works on the 'del' command, but I am not sure on the 'deltree' command.. try it, but your mileage may vary.

Use the '/y' toggle.. i.e :

del /y game*.sav
Oops:o Forgot about this old thread.

I actually figured it all out a while ago. Thanks anyway though.:)

If anyone is curious, the /y switch only works with the deltree command. For multi-FILE deletion without the prompt, you need to lead the line with the echo y | command.
i.e. echo y | del c:\windows\crap\*.* :D