I need to determine empty folders within a given file location (e.g. C:\test\) and output the empty folder file names to an output file (e.g. C:\test\output.txt).
I have this code for the batch file however I can only echo ALL the folders to the txt file. I only need the empty folder file names to be echoed.
for /d %%d in (*) do (
rd /q %%d
echo %%d >> c:\test\output.txt
Can someone assist me with this?