I need some help in replacing some text in file using bat file.
I have such a template where I need to change version:
[assembly: AssemblyVersion("5.1.1000.0")]
[assembly: AssemblyFileVersion("5.1.1000.0")]
I have written the next script but cannot understand how to change this version inside text:
REM %%f is a file where I will search a string a change it
for /f "tokens=2" %%p in ('findstr /r "[0-9]\.[0-9]\.[0-9]*\.[0-9]" %%f') do (
echo %%p
)
Output:
AssemblyVersion("5.1.1000.0")
AssemblyFileVersion("5.1.1000.0")
How can I change 5.1.1000.0 to 7.1.1000.0,for example? That all text other text remains the same, only version will be changed.
sed) or with a VBScript. The extra executable would be far preferred.