title: How to write a batch file to check for specifed folders in a directory
body: <p>How can I write a batch file to check for specified subfolders in a directory and then generate a log file showing the results of the findings (found it or not found). I am new to scripting and below is what I have so far: </p>
  
  <pre><code>@echo off
  ECHO
  SET /P QUESTION="Perform file check (Y/N)?"
  if QUESTION == y goto :START_SCRIPT 
  
  :START_SCRIPT
  if exist "C:\Folder\ABC" (echo found it) else echo not found;
  
  if exist "C:\Folder\DEF" (echo found it) else echo not found;
  
  if exist "C:\Folder\GHI" (echo found it) else echo not found;
  
  test.bat &gt;&gt; out.txt
  </code></pre>