【bat】判断字符串是否包含某字符串
@echo off set a=55544333 set c=6666dfsfds set b=44 echo %a%| findstr %b% >nul && ( echo %a%包含%b% ) || ( echo %a%不包含%b% ) echo %c%| findstr %b% >nul && ( echo %c%包含%b% ) || ( echo %c%不包含%b% ) pause
@echo off set a=55544333 set c=6666dfsfds set b=44 echo %a%| findstr %b% >nul && ( echo %a%包含%b% ) || ( echo %a%不包含%b% ) echo %c%| findstr %b% >nul && ( echo %c%包含%b% ) || ( echo %c%不包含%b% ) pause