Curious said:
Is there a Windows command or utility that I can use to find out in a
given folder, what folders are empty (meaning they contain no files)?
You can do a Dir command for FILES (negative for directories) and
apparently it sets the errorlevel if file not found (no regular files).
dir DirName /a-d & if errorlevel 1 echo Errorlevel: %errorlevel% no files
found
This means you can test for the errorlevel and and use the results to
execute different batch code.
/ad gives only results where the attribute is a DIRECTORY (or Junction
Point),
and /a-d changes this to where the attribute is "not a directory".