回复 3# lijiehao - @echo off
- for /f "delims=" %%a in (系统信息.txt) do (
- if /i "%%a"=="(B系统)" set "b=1"
- if /i "%%a"=="(C系统)" set "c=1" & set "b="
- if defined b echo,%%a>>b.$
- if defined c echo,%%a>>c.$
- )
-
- findstr /ig:机构号.txt b.$>nul && goto :B_found || goto :B_notfound
- findstr /ig:机构号.txt c.$>nul && goto :C_found || goto :C_notfound
-
- :B_found
- echo 找到B
- goto :end
-
- :B_notfound
- echo 找不到B
- goto :end
-
- :C_found
- echo 找到C
- goto :end
-
- :C_notfound
- echo 找不到C
- goto :end
-
- :end
- pause
复制代码
|