How to make .BAT file delete it self after completion? I have a simple bat file that terminates a process. I want that .BAT file to delete itself.
You could also direct the output of the DEL "%~f0" to NULL output like so...
@ECHO OFF SETLOCAL SET someOtherProgram=SomeOtherProgram.exe TASKKILL /IM "%someOtherProgram%" DEL "%~f0" > NUL