|SET /p choice=Do something? [N]:|
|IF NOT '%choice%'=='' SET choice=%choice:~0,1%|
|IF '%choice%'=='Y' GOTO yes|
|IF '%choice%'=='y' GOTO yes|
|IF '%choice%'=='N' GOTO no|
|IF '%choice%'=='n' GOTO no|
|IF '%choice%'=='' GOTO no|
|ECHO "%choice%" is not valid|
|ECHO Do all of the no things here!|
|ECHO Do all of the yes things here!|
Changing line 10 from no to yes will not automatically select yes if no input is provided.
Is there any reason you'd need this? It's rather dated. I would recommend using PowerShell as a much more modern and capable way of scripting.
Yes, you are correct. I misread that. I was thinking he meant if they just hit "Enter" without putting in a selection, it would just take them to the "yes" block.