오케이 그래서 내장 된 업데이터로 스크립트를 만들고, 다음 코드로 새 파일을 만들고 여러 변수를 업데이트하지만, 어떤 이유로 이건 작동하지 않습니다. 아이디어를 수정하는 방법 또는 비슷한 스크립트를 작성하는 방법.배치 파일에 대해 찾기 및 바꾸기가 작동하지 않습니다.
@echo off
setlocal enabledelayedexpansion
set /p "findthis"="1"
set /p "replacewith"="1.2.3"
call:updater
set /p "findthis"="2"
set /p "replacewith"="2.3.4"
call:updater
set /p "findthis"="3"
set /p "replacewith"="3.4.5"
call:updater
goto:eof
:updater
for /f "tokens=*" %%a in (updateme.bat) do (
set write=%%a
if %%a==%findthis% set write=%replacewith%
echo !write!
echo !write! >>%~n1.replaced%~x1
)
goto:eof