- @echo off
- :start ============================================================
- echo LUNO,NETNO,HostPortNo0,IP,子网掩码,网关,处理器主频>>cc.txt
- set "_CPU_BL=0"
- for /f "tokens=* delims=" %%A in ('dir /a-d/b/s "文件夹A\*.txt"') do (
- setlocal enabledelayedexpansion
- for /f "tokens=1,2* usebackq delims=.,=: " %%a in ("%%~A") do (
- if /i "%%~a"=="LUNO" set "_LUNO=%%~b"
- if /i "%%~a"=="NETNO" set "_NETNO=%%~b"
- if /i "%%~a"=="HostPortNo0" set "_HostPortNo0=%%~b"
- if /i "%%~a %%~b"=="IP Address" set "_IP_Address=%%~c"
- if /i "%%~a %%~b"=="Subnet Mask" set "_Subnet_Mask=%%~c"
- if /i "%%~a %%~b"=="Default Gateway" set "_Default Gateway=%%~c"
- if !_CPU_BL!==1 set "_CPU=%%~b %%~c"&set "_CPU_BL=0"
- if /i "%%~a"=="处理器" set "_CPU_BL=1"
- )
- echo !_LUNO!,!_NETNO!,!_HostPortNo0!,!_IP_Address!,!_Subnet_Mask!,!_Default Gateway!,!_CPU!
- endlocal
- )>>cc.txt
-
-
- :end=============================================================
复制代码
|