batch file edit

Associate
Joined
2 Jul 2004
Posts
1,430
Anybody got an idea how I can tackle this problem.

Theres some 365 files in a directory, and in each file if the 6 and 7th chars reads 'SF', it needs to be modified to 'R4' and saved. Repeat for each file in dir.

Cheers.
 
Google for editplus (shareware)
it can do thsi quite easily as you can search within directories
 
unix sh/bash: for i in *;do if [ "$(dd if=$i bs=1 count=2 skip=6 2>/dev/null)" == "SF" ];then echo R4|dd of=$i bs=1 count=2 seek=6 opt=notrunc 2>/dev/null;fi;done

windows: ????? ;)
 
Back
Top Bottom