I'm reading the book "The personal trainer: Windows command line".
It says that I need to use @ symbol to begin nested IF statement.
Use @ symbol to designate the start of the nested if statement.
Code: Select all
if "%1"=="1" (
@if "%2"=="2" (hostname & ver) else (ver)
) else (
hostname & ver & netstat -a
)
Code: Select all
for /d %%B in (%APPDATA% %APPDATA%\*) do (
@for %%C in ("%%B\*.txt") do (echo %%C)
)
Do I need to use @ symbol to begin nested IF or FOR statement?
What is the difference between using @ symbol and not using it?
Thanks!