Table of Contents

윈도(도스) 스크립트 포멧인 cmd 문법 설명

기본

명령어 예제들

rem This comment has no effect to cmd script

터미널에 “Hello World” 출력

echo Hollo World

“Input Num :“이란 프롬프트로 키 입력을 받아 num 변수에 저장

set /p num=type Input Num :

외부 프로그램 or 스크립트 실행

call GetCPUNum

이전 명령어의 에러번호(%errorlevel%)를 가지고 조건문 실행

if '%errorlevel%'=='1' set PARALLEL_BUILD=1
if '%errorlevel%'=='2' set PARALLEL_BUILD=3

goto

TAG는 ':'로 시작

:TAG_NAME
echo I am under tag, TAG_NAME

TAG_NAME 태그로 이동

goto TAG_NAME