Question : Batch File command to delete itself after execution

Hi -

I found this before, but now I can't find it again :

What is the batch command to add to the end of a batch file to delete itself after execution?   It is something along the lines of delete %0, but I am not sure.  

Answer : Batch File command to delete itself after execution

That seems logical - the only trick being you must specify the full command name - For example if your batch file is name runme.cmd and to execute it, you simply type "runme" then delete (or del) %0 expands to "del runme" - which will fail... you would need to execute the batch file using the complete file name like - runme.cmd - then "del %0" expands to "del runme.cmd".  Of course, you can also just put in the .cmd - "del %0.cmd"
Random Solutions  
 
programming4us programming4us