title: Batch script: Checking if VALID or INVALID input
body: <p>I need an output to check if the inputted data on notepad if the group is valid or invalid. A group name will be considered valid if it contains the string &quot;APP_FRA&quot;.</p>
  <p>output needed:</p>
  <blockquote>
  <p>Invalid - DVA_UA_ZETAFAXFAXCLIENT_2014_01-T000</p>
  <p>Valid   - APP_FRA_WFL_PEL_CIM_DK_ICG_SEPA</p>
  <p>Valid   - APP_FRA_WFL_PEL_CIM_NO_ICG_SEPA</p>
  <p>Invalid - DVA_UA_THOMSNONESMRT_57_00-T000</p>
  <p>Invalid - XSP_XA_LIBREOFFICECFG_50_00</p>
  </blockquote>
  <p>==========================================</p>
  <p>Here's what I did:</p>
  <pre><code>@echo off
  
  SETLOCAL DISABLEDELAYEDEXPANSION
  
  for /F %%i in (File.txt) do (
  
      set &quot;f1=%%i&quot;
      if &quot;%f1%&quot;==&quot;%f1:APP_FRA=%&quot; (
      echo Valid - %%i
  ) else (
  
      echo Invalid - %%i
  ))
  </code></pre>
  <p>==========================================</p>
  <p>I'm getting this output always:</p>
  <blockquote>
  <p>Invalid - DVA_UA_ZETAFAXFAXCLIENT_2014_01-T000</p>
  <p>Invalid - APP_FRA_WFL_PEL_CIM_DK_ICG_SEPA</p>
  <p>Invalid - APP_FRA_WFL_PEL_CIM_NO_ICG_SEPA</p>
  <p>Invalid - DVA_UA_THOMSNONESMRT_57_00-T000</p>
  <p>Invalid - XSP_XA_LIBREOFFICECFG_50_00</p>
  </blockquote>
  <p>I would appreciate any help you can provide.</p>