|
Answer» Hello all, well I went and did it...I "UPGRADED" to Windows XP x64...and my trusty CHANGE.EXE program from Bill Guthrie (http://users.erols.com/waynesof/bruce.htm) no longer WORKS. Says it is from a different operating system. I have sent Bruce an email, but in the mean time;
Has anyone created a similar program in a BAT file? or does anyone have anyting that I can use to create one? I would prefer to do it in a straight BAT format for EASIER maintenance.
KenThis is probably more down and dirty than your utility, but it works ok as a generic search and REPLACE:
Code: [Select]echo off setlocal enabledelayedexpansion set txtfile=c:\scripts\text.txt set newfile=c:\scripts\text.chg
if exist "%newfile%" del /f /q "%newfile%"
set /p search=Search String= set /p replace=Replace With=
for /f "tokens=*" %%a in (%txtfile%) do ( set newline=%%a set newline=!newline:%search%=%replace%! echo !newline! >> %newfile% )
You should have no trouble making modifications.
|