Insights into building a solid I.T. foundation in the mid-size business world.

Search for and delete directory in MS Windows

for /f "delims=" %%d in ('dir <directoryPath> /s /b /ad ^| sort /r') do rd "%%d"

Note: remove one of the two percentage signs when running from command line.

Leave a Reply

Your email address will not be published. Required fields are marked *