title: Loop through text files to find a string batch
body: <p>I want to search all .config files for a string "Hello" and if it is found I want to call the function findString.  If not, I want it to continue searching .config files.</p>
  
  <p>This is what I have and I do not see what the problem is.</p>
  
  <pre><code>@echo off
  setlocal EnableExtensions
  
  
  :TOP
  for /R %%f in (*.config) do (
      findstr /i "Hello" "%%f" &gt;NUL
      if errorlevel 1 (
          call :findString
      ) else (
          goto TOP
      )
      pause 
      exit /b
  )
  
  :findString
      set "textfile=%1"
  </code></pre>