Windows – How to skip “are you sure Y/N” when deleting files in batch files

batch-filecmdwindows

I can't for the life of me remember how to bypass the annoying prompt are you sure? Y/N when deleting files.

I seem to recall it was something like:

del C:\Test && ECHO Y

Best Answer

Use del /F /Q to force deletion of read-only files (/F) and directories and not ask to confirm (/Q) when deleting via wildcard.