Redirect the output of the del command to nul:
del {whateveroptions} 2>nul
Or you can check the existence of the file before calling del :
if exist c:\folder\file del c:\folder\file
Note that you can use if exist c:\folder\nul or just if exist c:\folder\ (with the ending \ ) to check if c:\folder really a folder, not a file.
GolezTrol Jan 24 '13 at 13:36
source share