title: BAT file to replace string in two lines
body: <p>I'm writting a script in Windows, a .BAT file, to replace:</p>
  
  <p>Note that there is an ENTER, I mean the string is in two lines. And looks more complicated now: after the 2 double quotes there are 2 blank spaces and then the "ENTER"</p>
  
  <pre><code>""  
  "2014
  </code></pre>
  
  <p>So, something like: (double quote)(double quote)(space)(space)(newline)(double quote)2014</p>
  
  <p>I'm having problems with this. This is how the script looks like:</p>
  
  <pre><code>@echo off
  setlocal enabledelayedexpansion
  set INTEXTFILE=FILE_IN_CSV.csv
  set OUTTEXTFILE=222.csv
  set SEARCHTEXT=^"^"^"2014
  set REPLACETEXT=^"^"^"4
  set OUTPUTLINE=
  
  for /f "tokens=1,* delims=¶" %%A in ( '"type %INTEXTFILE%"') do (
      SET string=%%A
      SET modified=!string:%SEARCHTEXT%=%REPLACETEXT%!
  
      echo !modified! &gt;&gt; %OUTTEXTFILE%
  )
  del %INTEXTFILE%
  rename %OUTTEXTFILE% %INTEXTFILE%
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: adding source text example. See that there are 3 (not 2!) black spaces at the end of each line.</p>
  
  <pre><code>"2014091810000076";"Question about folder sizes";"2014-09-18 12:10:20";"2014-09-25 17:33:15";"Resolt Sistemes";"jbgsfnam";"Sistemes::Altres";"STFD";"peticions";""   
  "2014091910000109";"Error opening word files with office 2013";"2014-09-19 09:50:07";"2014-09-25 14:27:59";"Resolt TRO";"yerttom";"Qualitat::Altres";"STFD";"peticions";""   
  </code></pre>
  
  <p>I just need to delete the 20 at the beginning of each line, but not the others 20 in the middle of lines.</p>