title: how to search and replace case sensitive string using batch
body: <p>I want to search and replace case sensitive string </p>
  
  <p>like if I have  rise Rise RISE in a text file  I only want to replace string "rise"
  the code below is replace all three strings.</p>
  
  <p>Kindly help me !</p>
  
  <pre><code>@Echo on
  SETLOCAL ENABLEEXTENSIONS
  SETLOCAL DISABLEDELAYEDEXPANSION
  
  set file="c:\Users\rawal\Desktop\a\file.txt"
  set /p Input=Enter some text:
  set OldStr="rise"
  set NewStr=%Input% 
  
  for /f "tokens=1,* delims=]" %%A in ('"type %file% |find /n /v """') do (
  set "line=%%B"
  if defined line (
  call echo %%line:%OldStr%=%NewStr%%%&gt;&gt; %file%_new
  ) ELSE echo.
  )
  
  move /Y %file%_new %file% &gt; nul
  </code></pre>