title: Windows - List all non empty directories in a folder and write to file
body: <p>I found an answer to find all empty directories. I want to do the opposite to find and list non empty directories in a folder. The folders just go one level deep.</p>
  
  <pre><code>@echo off
  for /d /r %1 %%A in (.) do (
    dir /a /b "%%~fA" 2&gt;nul | findstr "^" &gt;nul || echo %%~fA
  )
  </code></pre>
  
  <p>How to modify the above line to find non empty folders ?</p>