CHOICE: The CHOICE command. This is a DOS external command, but it is mainly used in batch files.
After the CHOICE command is executed, it will prompt for selectable items, and then select by pressing a key.
Usage: CHOICE key list] selected value, seconds]
Among them, /C means selectable keys, /N means not to display the prompt information, /S means case-sensitive mode, /T means if there is no selection within the specified time, automatically execute a certain selection value defined in /C. The prompt text is the prompt information when the CHOICE command is executed. The selection result will be represented by the ERRORLEVEL value.
IF ERRORLEVEL error return code command
Meaning: If the error return code is greater than or equal to the specified code, a certain command will be executed.
Among them, ERRORLEVEL represents the error return code, which is very useful. For many DOS commands, due to different execution results (such as successful execution, failed execution, or interrupted by the user, etc.), these commands will return different codes to indicate different results. The IF ERRORLEVEL command executes different commands according to the different codes generated by this different result, and is usually used after a certain command. For example, IF ERRORLEVEL 1 ECHO OK! means that if the current error return code is greater than or equal to 1, the words "OK!" will be displayed on the screen
After the CHOICE command is executed, it will prompt for selectable items, and then select by pressing a key.
Usage: CHOICE key list] selected value, seconds]
Among them, /C means selectable keys, /N means not to display the prompt information, /S means case-sensitive mode, /T means if there is no selection within the specified time, automatically execute a certain selection value defined in /C. The prompt text is the prompt information when the CHOICE command is executed. The selection result will be represented by the ERRORLEVEL value.
IF ERRORLEVEL error return code command
Meaning: If the error return code is greater than or equal to the specified code, a certain command will be executed.
Among them, ERRORLEVEL represents the error return code, which is very useful. For many DOS commands, due to different execution results (such as successful execution, failed execution, or interrupted by the user, etc.), these commands will return different codes to indicate different results. The IF ERRORLEVEL command executes different commands according to the different codes generated by this different result, and is usually used after a certain command. For example, IF ERRORLEVEL 1 ECHO OK! means that if the current error return code is greater than or equal to 1, the words "OK!" will be displayed on the screen
****DOS****DOS****

