Код:
@echo off& :команда "echo off" обязательна
set "word_1=the"
set "word_2=мама"
(
for /f "usebackq delims=" %%i in ("1.txt") do (
for %%j in (%%i) do (
if /i "%%j"=="%word_1%" (
set /p"=%word_2% "<nul
) else (
set /p"=%%j "<nul
)
)
echo.
)
)>"2.txt"
exit /b