title: Batch file output missing files to a textfile
body: <p>I am trying to make a batch file to look for file names based on a list I have in a text file (one file name per line without an extension ) <br>
  The batch file needs to search in a folder+subfolders and output the files it DIDN'T FIND to a text file (Missing.txt)` </p>
  
  <pre><code>echo off
  for /f "tokens=*" %%i in (Filelist.txt) DO echo %%i&gt;InList.txt
  (
  IF NOT EXIST %%i (echo %%i&gt;Missing.txt) 
  ) 
  </code></pre>
  
  <p>ok so now InList.txt have all the file names from Filelist.txt regardless if they exist or not <br>
  and Missing.txt has %i in the file</p>
  
  <p>ok so this is the code i used to solve my problem<code>
      @echo off
      for /f  "tokens=*" %%i in (Filelist.txt) DO (
      IF EXIST %%i.* (echo %%i&gt;&gt;InList.txt) ELSE echo %%i&gt;&gt;Missing.txt
      )
  </code></p>
  
  <p>my filenames inside Filelist.txt had no extensions so i added .* after the %%i in the IF statement but if your filelist has extensions you can use the solution below  </p>