Tags: #scripting # Batch Script Basics ## Comments ### In Script Only ``` :: This is a comment! ``` ### In Both Script and Console Output `@` at the beginning of a line will suppress that line in the output (useful if you want to display a comment in both the script and the output, without the comment appearing twice in the output). > [!Example] > `@echo Some comment in both the script and console output.` ### Conditional Comments If you use `@` to suppress an if statement, you shouldn't put `@` in front of the commands inside the if statement, the entire conditional will be suppressed already and an echo command inside of it will still produce console output if executed. ``` @if %ERRORLEVEL%==1 ( echo Output copied successfully! exit /b 0 ) ``` ## Variables Set like this: ``` set PROJECT_PATH=.\Source\Application\QwickBondsOrderRelay ``` Use like this: ``` dotnet restore /p:EnableWindowsTargeting=true %PROJECT_PATH% ```