I have a text file ... 'datarcTemp'
0 data/srdata
1 data/my.dat
2 data/alp1.dat
3 data/ba.dat
I want to find 'alp1.dat' and replace it with 'alp2.dat' I am using for loop to find it, but it is not working. Any ideas ??
set x=2
set y= data/alp1.dat
set line=%x%%y%
for /f "tokens=*" %%a in (datarcTemp) do (
if %%a=="%line%" echo line found
set /a count+=1
rem counting all lines
)