回复 1# hijackle
- @echo off&(setlocal enabledelayedexpansion)>nul 2>nul
- for /f "delims=" %%i in ('wmic process get caption /value^|findstr/i "[0-9]"')do (set "%%i"
- for /f "delims=" %%j in ("!caption!")do (set "name=%%~nj"&set "new="&set "n="
- for /l %%n in (0,1,8092)do if /i not "%%~nxj"=="" if /i not "!name:~%%n,1!"=="" (
- for /l %%o in (0,1,9)do if /i "!name:~%%n,1!"=="%%o" (set/a "n+=1"
- if defined new (set "new=!new!!name:~%%n,1!")else (set "new=!name:~%%n,1!")
- )
- )
- if /i "!new!%%~xj"=="%%~nxj" (
- echo,!n!
- if !n! gtr 4 (
- echo,%%~nxj
- )
- )
- )
- )
- pause
复制代码
注:没测试 |