本帖最后由 qixiaobin0715 于 2021-10-11 14:18 编辑
未测试:- @echo off
- set Names=PowerOnHours PowerOnCount HostWrites HostReads
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /b /s /a-d Smart\*.ini') do (
- for %%k in ("%%~dpa.") do echo,%%~nk
- set PowerOnHours=通电时间:
- set PowerOnCount=通电次数:
- set HostWrites=主机写入量总计:
- set HostReads=主机读取量总计:
- for /f "tokens=1,2 delims==" %%i in ('findstr "%Names%" "%%a"') do (
- if defined %%i echo,!%%i!%%j
- set %%i=
- )
- )
- pause
复制代码
|