title: Problem with Absolute path and Relative path in batch file
body: <p>I am facing problem with Absolute path and Relative path in batch file...I have program as </p>
  
  <pre><code>@echo off 
  
  setlocal enabledelayedexpansion
  
  set LOCATION=D:\TESTING\a\b\try
  
  set OUTTEXTFILE=test_out.txt
  set SEARCHTEXT=hello
  set REPLACETEXT=world
  
  
  FOR /r %LOCATION% %%x IN (\*.txt,\*.java) (
  DO echo %%x
  SET INTEXTFILE=%%x
  )
  
  
  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>It should read all txt and java files from "D:\TESTING\a\b\try" dir and change the text 'hello' to 'world' in them</p>