I am writing a batch script where if user input is empty or doesnot ends with "DTO" I need to ask user to enter DTO name again.
:INPUT
SET /P INPUTDTO=Enter the DTO:
IF "%INPUTDTO%"=="" (
IF "%INPUTDTO%" ??????? (
GOTO NODTO
)
)
:NODTO
ECHO ERROR: Please enter a valid DTO.
GOTO INPUT
How to check if the user input ends with "DTO"