set thisVer="2"
IF EXIST "C:\Program Files\Deployments\deploy.ver" (
FOR /F "tokens=* USEBACKQ" %%F IN (`type "C:\Program Files\Deployments\deploy.ver"`) DO (
type "C:\Program Files\Deployments\deploy.ver"
set build=%%F
)
echo "Build version: %build%"
echo "This version: %thisVer%"
IF "%build%"=="%thisVer%" (
echo "Same Versions"
exit /B 0
)
The above code generates the following output...
"2"
"Build version: Files\Deployments\deploy.ver"
"This version: "2""
Would someone please tell me why %build% is not equal to the contents of the file C:\Program Files\Deployments\deploy.ver?