General discussion

Locked

Delete command in a batch file?

By jim_rau ·
I have a batch file I built with NotePad in Win95 and one of the commands is "del f:\slik-app\data\*.*"

The batch runs fine except that this command requires a confirmation. I am using this as part of an automated process. I need to figure out what is needed in the batch so it does not ask for confirmation.

Any ideas/answers???

This conversation is currently closed to new comments.

12 total posts (Page 2 of 2)   Prev   01 | 02
Thread display: Collapse - | Expand +

All Comments

Collapse -

Delete command in a batch file?

by Al Hedstrom In reply to Delete command in a batch ...

You need The Pipe:

echo y | del c:\temp\*.*

The character after the Y, pipe, is located above the backslash on my keyboard (yours may be different).

This technique temporarily puts a "Y" in the keyboard buffer and feeds it back the next time DOS expects keyboard input - in this case, confirmation that you really know what you're doing when you delete all files.

Hope this helps.

Al Hedstrom

Collapse -

Delete command in a batch file?

by jim_rau In reply to Delete command in a batch ...

Right answer but a bit slower than Al (sorry). Thanks for the time though ...

Back to Windows Forum
12 total posts (Page 2 of 2)   Prev   01 | 02

Related Discussions

Related Forums