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, ∼2762🔥, 0💬
Popular Posts:
I have several computers. How can I share my Internet Explorer favorites between two computers? Favo...
How to configure PHP execution environments? If you followed our Downloading PHP Engine tutorial , y...
Can I disable Windows service "hpqwmiex.exe - HP ProtectTools security manager" to speedup my comput...
Can I remove startup application "shstat.exe - VirusScan On-access scanner statistics" to speedup my...
How to download ActivePerl 5.8.8.820? If you are interested in using Perl on your Windows system, yo...