@echo off setlocal enableextensions enabledelayedexpansion FOR /F "tokens=1-4" %%A IN (version.txt) DO ( set major=%%A set minor=%%B set revision=%%C set build=%%D ) set file=%* echo Injecting Revision !major!.!minor!.!revision!.!build! %file% set PATH=.\bin;%PATH% sed s/majorVersion=0/majorVersion=!major!/ !file!.tmp mv "!file!.tmp" "!file!"