Supressing Prompts In Batch Files While Deleting All Files
Successful batch files cannot be slowed down with a bunch of user prompts. This little recipe will show you how to supress prompts in batch files.
Commands such as deleting all files can complicate batch files because the system prompts for confirmation. For example…
del *.* replies with *.*, Are you sure (Y/N)?
Man, that’ll slow up a batch file.
By using echo this will automatically reply for you:
echo y| del *.*
To supress the “File Not Found” error when trying to delete files from an empty directory, use this code instead:
if exist *.* echo y| del *.*






Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment