title: Batch to move folders that have a specific file in it
body: <ol>
  <li><p>I am trying to get a list of folders that have a specific file <code>*.t</code> in it (there is not more than one such file in a folder):</p>
  
  <pre><code>setlocal enabledelayedexpansion
  
  for /f "delims=" %%a in ('Dir /B /A:-D /S "D:\Old\Stuff\*.t"') do 
  (@echo %%~dpa&gt;&gt;Folders.txt)
  
  endlocal
  </code></pre>
  
  <p>This works and gives me a file with the full path and a <code>\</code> at the end...</p>
  
  <p><i>e.g.<br>
  D:\Old\Stuff\Folder 1\<br>
  D:\Old\Stuff\Folder 2\<br>
  D:\Old\Stuff\Folder 3\</i></p></li>
  <li><p>I then want to move said folders with it's contents to another location, but it's not working:</p>
  
  <pre><code>for /f "delims=" %%i in (Folders.txt) do Move %%i "D:\New\Stuff\"
  </code></pre></li>
  </ol>
  
  <p>What am I doing wrong?</p>