Writing a self deleting batch file

Some people laugh at me when I tell them I love to write batch files.Thinking

Today i found myself in kinda a pickle, I wanted to write a batch file that would delete itself as well as any files in the directory it was located in. So I turned to my good friend Google, not too much luck… Lucky I can usually figure this stuff out. Here’s what worked for me…

The solution:
@echo off
del. /q

the del. deletes everything in the working directory and /q switch makes it so you don’t have to confirm every file delete (quite mode).

I hope this info was helpful!

Tags: ,