 
- 帖子
- 1098
- 积分
- 1857
- 技术
- 247
- 捐助
- 0
- 注册时间
- 2021-10-13
|
提取尾部仅有一个'_'的字段'xxx_yyy'中的'xxx',代码如下:
@echo off
(for /f "delims=" %%s in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services"') do echo,%%~nxs)>"0.0"
for /f "tokens=1 delims=_" %%1 in ('findstr /R "_[^_]*$" "0.0"') do (echo,%%1)
exit |
|