How to delete files in MS-DOS without a prompt
By default, MS-DOS and the Microsoft Windows command line will not prompt a user or give a user a prompt or warning when deleting files on a computer using the del command. However, when attempting to delete a directory using the del, deltree, or rmdir command, ensure that it isn't empty or you will receive a warning or error.
Note: When deleting anything from MS-DOS or the Windows command line it is not sent to the Recycle Bin.
To suppress the prompting use the deltree command and add the tag /y, as shown in the example below that deletes all files in the Windows temp directory.
deltree c:\windows\temp\*.* /y
Note: The above command does not work in all versions of Windows and MS-DOS.
If this command does not work we would recommend that you create a batch file with the below command in the batch file.
echo y | del %1\*.*
Once created, you can type the name of the batch file then the name of the directory that you want to delete.
Rd and rmdir command
Users who want to delete a directory containing files in a Windows command line window running under Microsoft Windows 2000 or later can also use the rmdir or rd command with the /S option.
If you're running a later version of Microsoft Windows and using the Windows command line you can also use the erase command to delete files without a prompt.