Copy Code code as follows:
:: For example, I enter AF on the display
:: A
:: b
:: C
::d
:: E
:: F
:: One line for each letter "I do not know whether it can be achieved."
@echo off
::
::
: Begin
Cls
Set Str=a b c d E F g h i j k l m n o p q R S t u v w x y Z
Set input=
set/p input= Please enter a letter range (such as AF):
Call Set str=%%str:%input:~0,1%=-☆%input:~0,1%%%
Call Set str=%%str:%input:~-1%=%input:~-1%☆%%
for/f "tokens=2 delims=☆"%%i in ("%str%") do set str=%%i
For%%i in (%str%) do echo%%i
Pause
Goto BEGIN
@echo off
::
::
Set Str=a b c d E F g h i j k l m n o p q R S t u v w x y Z
: Begin
Cls
Set flag=0
Set var=
Set input=
set/p input= Please enter a letter range (such as AF):
For%%i in (%str%) does call:p Ickup%%i
: End
Pause
Goto BEGIN
:p Ickup
if/i '%1 ' = = '%input:~0,1% ' Set flag=1
if/i '%1 ' = = '%input:~-1% ' Set flag=2
If%flag% equ 1 echo%1
If%flag% equ 2 echo%1&goto end
Goto:eof
@echo off
:: First encode each element of the string and then convert it
::
::
Setlocal enabledelayedexpansion
Set Str=a b c d E F g h i j k l m n o p q R S t u v w x y Z
For%%i in (%str%) do set/a dec+=1 & set%%i=!dec! & Set str!dec!=%%i
Set en=
set/p en= Please enter a letter range (such as AF):
set/a num1=!%en:~0,1%!,num2=!%en:~-1%!
FOR/L%%i in (%num1%,1,%num2%) do echo!str%%i!
Pause>nul
Goto:eof
@echo off
:: By comparing the size of the character's internal code to achieve, the limitations are very large
::
::
Setlocal enabledelayedexpansion
Set Str=a b c d E F g h i j k l m n o p q R S t u v w x y Z
Set en=
set/p en= Please enter a letter range (such as AF):
Set str1=%en:~0,1%
Set str2=%en:~-1%
For%%i in (%str%) do if%%i geq!str1! if%%i leq!str2! echo%%i
Pause>nul
Goto:eof
@echo off
:: Disadvantage: Slow speed
::
::
: Begin
set/p a= "Old-hee:"
Set Str=a b c d E F g h i j k l m n o p q R S t u v w x y Z
For%%i in (%str%) do echo%%i|findstr [%a:~0,1%-%a:~-1%]
Pause
Goto BEGIN