title: Exclude a list of files from a dir command
body: <p>I need to make a list of files using dir that does not include certain files listed in a .txt file. I tried doing something like this but it does not seem to work:</p>
  
  <pre><code>dir %ProjectDir%\*.ts /b /s | findstr /v /f:listFiles.txt &gt; Files.txt
  </code></pre>
  
  <p><strong>Edit</strong>: This sort of works but only one file name gets added to the text file.</p>
  
  <pre><code>for /f "tokens=* delims= " %%a in ('dir %ProjectDir%TypeScript\*.ts /b /s') 
  do (
    find /i "%%a" &lt; strictFiles.txt &gt; nul || echo.%%a &gt; tsFiles.txt
  )
  </code></pre>