CopyCodeThe Code is as follows: @ echo off
Set M = 0
: AGN
Set/a m + = 1
If % m % gtr 5 (
Echo. five chances have been used up, and will automatically exit in 3 seconds...
Ping-N 4 127.1> NUL
Goto: EOF
)
Set input = & set/P input = enter 3 to 10 English letters:
If not defined input (echo. The content cannot be blank !!! & Goto: AGN)
Echo. % input % | findstr/I/V "^ [A-Z] * $"> NUL & (echo. Enter a pure English letter !!! & Goto: AGN)
Set n = 0
: Count
Set/a n + = 1
If not "% input :~ 1% "=" "(set input = % input :~ 1% & Goto: Count)
If % N % LSS 3 (
Echo. The number of input letters cannot be less than 3 !!! Please enter it again !!!
Goto: AGN
) Else (
If % N % gtr 10 (
Echo. You entered too much !!! Please enter it again !!!
Goto: AGN
)
)
Set/P = the content you entered is within the permitted range... press any key to exit... <NUL
Pause> NUL
Goto: EOF