Silently delete a folder in Windows and… yourself

Here’s a quick batch file for DOS / Windows that deletes selected folder and then deletes itself:

@echo off
:try
rmdir "C:\Trash\Temp" /S /Q
if exist "C:\Trash\Temp" goto try
del %0

Creating an endless loop for deleting a folder stinks like a hell, but I haven’t figured out anything better so far.

Leave a Reply