- 帖子
- 25
- 积分
- 42
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2020-8-14
|
如下是TXT 内容
Description,Value
Battery Name,02DL008
Manufacture Name,SMP
Serial Number, 2669
Manufacture Date,
Power State,"Charging, AC Power"
Current Capacity (in %),67.6%
Current Capacity Value,"29,920 mWh"
Full Charged Capacity,"44,260 mWh"
Designed Capacity,"50,450 mWh"
Battery Health,87.7%
Voltage,"12,868 millivolts "
Charge/Discharge Rate ,"32,852 milliwatts "
Chemistry ,LiP
Low Battery Capacity (1),200 mWh
Low Battery Capacity (2),"2,213 mWh"
Critical Bias,
Number of charge/discharge cycles,184
Battery Temperature,
Remaining battery time for the current activity (Estimated),
Full battery time for the current activity (Estimated),
Remaining time for charging the battery (Estimated),
Total time for charging the battery (Estimated),
提取11行Battery Health,87.7%中的87.7%但是不要%做输出变量,上个帖子有前辈代码教了 提取指定行数和指定字节
for /f "tokens=2 delims=," %%i in ('type scomma.txt^|find "Battery Health"') do set H=%%i 输出结果是H变量为87.7% 我怎么让它没%好,纯输出数字呢?因为我发现百分比不能再批处理中对比大小,
if %H% GTR 95% goto PASS 不能这么用。。。。。 去掉%后这样 if %H% GTR 95 goto PASS 可以正常比对了,请教下 |
|