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, ∼2619🔥, 0💬
Popular Posts:
What is GoogleUpdaterService.exe - Google Updater Service? GoogleUpdaterService.exe is binary file o...
How to export Windows services to a text file? If you want to export services that are currently con...
.VOB File Name Extension - DVD Video Object Files .vob is the file name extension for DVD-Video Obje...
What are default background services on a Windows 7 Home Premium computer? If you are running a Wind...
What is the installed program "Microsoft .NET Framework 4.5.1 SDK" on my Windows 7 computer? "Micros...