title: Batch file to list files and folders in a simple format
body: <p>I need a batch file that recursively list folders and their files (with dates) to a text file. I've found several online, like this one</p>
  
  <pre><code>echo off
  for /d %%a in (*.*) do dir "%%a" &gt;&gt; Report.txt
  </code></pre>
  
  <p>But none in the simple format that I need. The batch file would be run from the top search directory. I'd like to full path to the search folder listed at the top, followed by the folder and subfolder names, even if they're empty, without their paths, each followed by their files accompanied with a time stamp. So, something like this:</p>
  
  <pre><code>FullPathToTopFolder 
      FolderName1
          DateStamp   FileName1.txt      
          DateStamp   FileName2.txt      
          DateStamp   FileName3.txt      
      FolderName2
          DateStamp   FileName4.txt      
          DateStamp   FileName5.txt       
      FolderName3
          DateStamp   FileName6.txt      
      FolderName3
          /SubFolderName1
              DateStamp   FileName7.txt      
              DateStamp   FileName8.txt      
      FolderName4 
          /SubFolderName2
          /SubFolderName3
          /SubFolderName4
              DateStamp   FileName9.txt      
              DateStamp   FileName10.txt  
  </code></pre>