IF Performs conditional processing in batch programs. If the condition specified by an IF command is true, MS-DOS carries out the command that follows the condition. If the condition is false, MS-DOS ignores the command. You can use this command only in batch programs. Note: There are several usages of IF command: 1. IF EXIST format: IF [NOT] EXIST filename command filename --- the filename you specify to test. To test whether a file exists. If you want to test whether a directory exists, you can do it by simply specifying a NUL device of the directory. For example, "IF EXIST C:\NUL" tests whether there is a drive C; also, "IF EXIST C:\WINDOWS\NUL" tests whether there is a path "C:\WINDOWS". command --- the command you want to execute. It can be a usual command, or a batch command, such as GOTO. NOT --- make the result true to false, false to true. 2. IF string1==string2 format: IF string1==string2 command string1, string2 --- two strings to compare. Both shouldn't be null, and under Windows 9x or MS-DOS they should be spaceless. If one of them is going to include spaces, it should be packed with quotation marks. To make both strings not empty, we usually add a character before each string. For example: IF '%no_c%=='yes GOTO a 3. IF ERRORLEVEL format: IF ERRORLEVEL number command number --- a decimal integer specifying the errorlevel. Errorlevel is a mark returned by a command. See command help of the operating system. For more information, please refer to MS-DOS Help or Windows NT command line command help.