title: Batch Script to list the root folder and then all files inside it greater than a specified size
body: <p>I am trying to write a script where I have to list all the folders inside a folder with the following logic:</p>
  <p>Say folder A, B, C are inside folder F
  and A, B and C contain subfolders and files.</p>
  <p>I have to write a script that would show the Folder A, B , C as header and then lists the files above a specified size inside them(including subfolders)... if possible with their modified date.</p>
  <p>I have prepared a skeleton.</p>
  <blockquote>
  <p>@echo off &amp; setLocal EnableDelayedExpansion
  pushd C:\F</p>
  <p>for /f &quot;tokens=* delims= &quot; %%a in ('dir/b/a:d') do (</p>
  </blockquote>
  <pre><code>echo %%a &gt;&gt;C:\F\list.txt
  echo &quot;-----------------------------------------------&quot;&gt;&gt;C:\F\list.txt
  pushd %%a 
  for /f &quot;tokens=* delims= &quot; %%i in ('dir/b/s') do (
      echo %%i &gt;&gt;C:\F\list.txt
      if %%~Za gtr 10000 echo %%i is %%~Za &gt;&gt;C:\F\list.txt
      ))
  </code></pre>
  <p>The the desired output is:</p>
  <h2>Directory A</h2>
  <p>file1 size1 date1</p>
  <p>file2 size2 date2</p>
  <h2>Directory B</h2>
  <p>file3 size3 date3</p>
  <p>file4 size4 date4</p>
  <h2>Directory C</h2>
  <p>file5 size5 date5</p>
  <p>file6 size6 date6</p>
  <p>---date field is not mandatory but better if included.</p>
  <p>Thanks &amp; Regards</p>