Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

IF ELSE and Comments

@IF "A" EQU "A" (
@ECHO True
) ELSE (
@CD .
)

in CMD it's allowed to mark a commandblock () with @ to disable output (ECHO OFF) of a whole block, like
@IF "A" EQU "A" (
ECHO True
) ELSE @(
CD .
)

In practice, i disable any possible output and enable areas where i must debug
 
Depending on the number of @s, it might be more efficient to use "echo off" and "echo on" .. yes/no?
 
What's with the @ signs in front of the parentheses?

@As the first character in a line: Do not save the current line in the history list when it is executed, nor store it in the CMDLINE environment variable.
 
Back
Top