Collections:
Other Resources:
"if" - Run Command Conditionally
What is the "if" batch command for?
✍: FYIcenter.com
The "if" command is for running a command conditionally.
Below is the "if" command syntax:
if condition command1 [else command2]
When the "if" command is executed, the specified condition will be evaluated first. If the condition is true, "command1" will be executed. If the condition is false and the "else" clause is provided, "command2" will be executed.
Here is an example on how to use the "if" command:
IF EXIST filename (DEL filename) ELSE (ECHO filename missing)
Notice that the "(DEL filename)" child command is enclosed in parentheses to end it before the ELSE keyword. Without parentheses ELSE will be considered as another file to be deleted.
⇒ "goto" - Change the Execution Flow
2021-04-02, ∼2500🔥, 0💬
Popular Posts:
Where does Mozilla FireFox 2 store cookie files on my computer? Some cookies are stored to your comp...
Daylight saving time has been changed since March 2007 in US, Canada and Mexico. How do I update my ...
What is "CNG Key Isolation" in my Windows XP service list? And how is "CNG Key Isolation" service re...
What is "Superfetch" in my Windows XP service list? And how is "Superfetch" service related to SysMa...
What is the scheduled task "\Microsoft\Windows\RAC\ RacTask"on my Windows 7 computer? "\Microsoft\Wi...