发布网友 发布时间:2022-04-23 01:26
共2个回答
热心网友 时间:2022-05-26 10:15
命令行输入 find /? 就会提示用法。热心网友 时间:2022-05-26 11:33
@echo off FOR /F "skip=2" %%i in ('find "D:\文件\" H:\1.txt') do ( set str=%%i ) set str1=%str:~6,100% ::echo %str1% set str=%str1% set ch1=. :next if not "%str%"=="" ( set /a num+=1 if "%str:~0,1%"=="%ch1%" goto last ::比较首字符是否为要求的字符,如果是则跳出循环 set "str=%str:~1%" set str2=%str2%%str:~0,1% goto next ) set /a num=0 :last echo %str2% pause