Reputation: 797
I'm converting a shell script that works into a .bat file.
Does anyone know how I would approach getting a version number from a file:
VERSION="$(<dist/public/VERSION)"
echo "Version: ${VERSION}"
This does not work:
set VERSION=dist\public\VERSION
echo "Version: %{VERSION}"
Upvotes: 1
Views: 110
Reputation: 3204
The correct syntax would be:
set /p VERSION=<dist\public\VERSION
echo Version: %VERSION%
Upvotes: 1