title: How to compare file names in directory with file names in a text file?
body: <p>I try to improve an overview of my search and find memories for batch files in Windows XP command prompt environment.<br>
  In order to my previous sentence I am not happy with my search possibilities and have to post a question.</p>
  
  <p>I try to compare the names of some text files and have written words in a text file that are by reading the same. With such a start environment I wrote following batch script to get an echo output.</p>
  
  <p>The aim is</p>
  
  <pre><code>@echo off
  setlocal enabledelayedexpansion
  for /f "delims=" %%b in ('dir "C:\A Folder"') do set var=%%~nb &amp; echo !var!
  
  rem   The output is the name of the files without extension. Now my question:
  rem   Is it possible to compare the above file names with some input
  rem   from a text file, for example like:
  
  for /f "delims=" %%b in ('dir "C:\A Folder"') do set var=%%~nb &amp; for /f %%a in (Textfile.txt) do (if !var!==%%a echo good else echo search)
  
  rem   That returns no output. I would like to know if there are possibilities
  rem   to do that? And if it is possible, how to revise this batch file?
  
  endlocal disabledelayedexpansion
  pause
  </code></pre>
  
  <p>Have a nice day, wishes
  Stefan</p>