title: Replacing a string in a bunch of text files in a windows folder
body: <p>Need help ! Working on a batch file which will replace a set of characters from a bunch of text files in a folder. I have found the code which will do that. But it does for only one file. IS there a way where it can do it for all the files in the folder. There a total of 1000 files inside  the folder. I am using a Windows 7 OS. Attaching the code I found where it does for one file.</p>
  
  <p>Thanks
  Harry </p>
  
  <hr>
  
  <pre><code> @echo off
  setlocal enabledelayedexpansion
  set INTEXTFILE=Replace_string.txt
  
  set OUTTEXTFILE=test_out.txt
  set SEARCHTEXT=Apple
  set REPLACETEXT=Mango
  set SEARCHTEXT=Cat
  set REPLACETEXT=Dog
  set OUTPUTLINE=
  
  for /f "tokens=1,* delims=¶" %%A in ( '"findstr /n ^^ %INTEXTFILE%"') do (
     SET string=%%A
     for /f "delims=: tokens=1,*" %%a in ("!string!") do set "string=%%b"
     if  "!string!" == "" (
         echo.&gt;&gt;%OUTTEXTFILE%
     ) else (
        SET modified=!string:%SEARCHTEXT%=%REPLACETEXT%!
        echo !modified! &gt;&gt; %OUTTEXTFILE%
    )
  )
  del %INTEXTFILE%
  rename %OUTTEXTFILE% %INTEXTFILE%
  </code></pre>