
The COPY command is used for copying files from one location to another location. The CONVERT batch commands the volumes or drives from one format to another i.e from FAT to NTFS. The COMP batch command compares the size of two files and checks if they are different in size. This batch command invokes a new command prompt window. This command is used to clear the console screen. here choice command will invoke the list and ask the user to select the character from the OFFĬHOICE /N /C:ABC /M "Select Character(A, B, or C)" In the below script I have created a list of A, B and C. If the user presses CTRL+BREAK or CTRL+C, choice returns an ERRORLEVEL value of 0. If choice detects an error condition, it returns an ERRORLEVEL value of 255. If the user presses a key that is not a valid choice, choice sounds a warning beep. The first choice in the list returns a value of 1, the second a value of 2, and so on. Note: The ERRORLEVEL environment variable is set to the index of the key that the user selects from the list of choices. If /m is not specified, only the choice prompt is displayed. Specifies a message to display before the list of choices. The default choice must be in the list of choices specified by /c. Specifies the default choice to use after waiting the number of seconds specified by /t. If /t is set to 0, choice does not pause before returning the default choice. Specifies the number of seconds to pause before using the default choice specified by /d.

By default, the choices are not case-sensitive. Specifies that the choices are case-sensitive. Hides the list of choices, although the choices are still enabled and the message text (if specified by /m) is still displayed. The default list is “YN”, which is displayed as ?. Valid choices include a-z, A-Z, 0-9, and extended ASCII characters (128-254). Specifies the list of choices to be created. In the batch script, choice command prompts the list of single-character choices and allows the user to select one item from the list.Ĭhoice ] Parameters: Parameter The batch command CHKDSK is used for checking errors in the disk.
