Skip to main content

Prompt user to select a choice and return the selected choice index.

:: To prompt the current user to select a 'Y' or 'N' choice:
choice

:: To prompt the current user to select a [c]hoice from a specific set:
choice /c <AB>

:: To prompt the current user to select a choice with a specific [m]essage:
choice /m "<message>"

:: To prompt the current user to select a [c]ase-[s]ensitive [c]hoice from a specific set:
choice /cs /c <Ab>

:: To prompt the current user to select a choice and prefer the [d]efault choice in a specific [t]ime:
choice /t <5> /d <N>

:: To display help:
choice /?