0

The accepted solution to the question Recursively delete empty directories in Windows

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

doesn't work due to the miss-interpretation of the tag '/R' ( returned error message : sort: cannot read: /R: No such file or directory )

Anyone can explain why ?

4
  • Work around use 'sort --reverse' instead of 'sort /r' Commented Oct 12, 2016 at 12:29
  • Are you on windows 7? Commented Oct 12, 2016 at 12:36
  • No on windows 10 Pro Commented Oct 12, 2016 at 12:37
  • Works fine here on Windows 10 Pro. Typos? Corrupt file system perhaps? Commented Oct 12, 2016 at 13:38

0

You must log in to answer this question.

Browse other questions tagged .