Answer the question
In order to leave comments, you need to log in
Why does the script not work when there are characters in the string?
There is a script. The goal is to substitute the version number in quotation marks. To do this, I look for the word version and replace the entire line with that word with the desired one.
@echo off
set verfile=D:\sw.txt
set tmpfile=D:\sw.tmp
set seek=version
if exist %tmpfile% del /q %tmpfile%
for /f "delims=" %%a in (%verfile%) do (
(echo %%a)|>nul find /i "%seek%="&&((echo var %seek%='0';)>>%tmpfile%)
(echo %%a)|>nul find /i "%seek%="||(echo %%a)>>%tmpfile%
)
copy /y %tmpfile% %verfile% >nul
del /f /q %tmpfile% >nul
"version":"5.5.3.5",
replaces Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question