Deprecated: Function set_magic_quotes_runtime() is deprecated in /customers/jogear.net/jogear.net/httpd.www/textpattern/lib/txplib_db.php on line 14
jogear.net: Removing directories recursively
Skip to Content »

 Removing directories recursively

  • 2009-05-20 14:44

I had a really deep hierarchy of directories and files and I wanted to remove all the .FooBar directories and their contents. In a batch file, this solves it:

@echo off
for /f "tokens=* delims=" %%a in ('dir /ad /b /s *.FooBar') do
(
    rd /s /q "%%a"
)