#TIL #batch 파일을 읽어 변수에 할당

set /p VERSION=<version.txt

set /p 명령어를 사용하면 된다. for /f 명령어를 사용해도 된다. set /p 명령어는 파일이 여러 줄일 때, 첫 줄이 적용되는 데 반해 for /f 명령어는 마지막 줄이 적용된다.

참고 - How to read file contents into a variable in a batch file? - stackoverflow

Feedback plz <3 @ohyecloudy, ohyecloudy@gmail.com

A Random Post