Skip to main content
downloadsquad.com redirects to Huffington Post and superuser.com is not a place for website recommendations, some general cleaning
Source Link

You can use this utility: Remove Empty Directories utility.

Alternatively you can use this one-liner batch file (from DownloadSquad):

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

(if used inside a batch file, replace %d with %%d)

(This This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(if used inside a batch file, replace %d with %%d)

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

You can use Remove Empty Directories utility.

Alternatively you can use this one-liner batch file (from DownloadSquad):

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

(if used inside a batch file, replace %d with %%d)

This works because rd will not remove a directory that contains files.

from the command line, it wouldn't work as is
Source Link
Braiam
  • 4.7k
  • 3
  • 27
  • 58

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(if used inside a batch file, replace %d with %%d)

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(if used inside a batch file, replace %d with %%d)

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

Fixing dead link.
Source Link
Mokubai
  • 93.8k
  • 27
  • 215
  • 245

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquadDownloadSquad, an excellent site to add to your RSS feeds. :)

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

You can use this utility: Remove Empty Directories

Alternatively you can use this one-liner batch file:

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

(This works because rd will not remove a directory that contains files.)
One-liner taken from DownloadSquad, an excellent site to add to your RSS feeds. :)

Adding important note. At first blush the answer would seem to nuke all folders. Instead it throws up warnings for non-empty folders.
Source Link
Loading
deleted 57 characters in body
Source Link
Gareth
  • 18.9k
  • 15
  • 58
  • 69
Loading
added 69 characters in body
Source Link
caliban
  • 20.2k
  • 5
  • 51
  • 62
Loading
Source Link
caliban
  • 20.2k
  • 5
  • 51
  • 62
Loading