- @echo off
- path=%path%;%~d0\DOS\网络;%~d0\DOS\command\第三方命令行程序;%~d0\DOS\command;%~d0\DOS\源码;%~d0\DOS\sysbkup
- :start ============================================================
- ::for /f "tokens=2" %%G in ('tasklist /nh') do process -a %%G 1000
- ::设置不被更改的过滤关键词
- set "Filter_char=Idle"
- tasklist /nh|findstr /vi "%Filter_char%">"%temp%\01.txt"
-
- set "cmdstr=type "%temp%\01.txt"^|sed "s/\([a-zA-Z0-9 .]\+[ ]\+\)\([0-9]\+\)\([ ]\+[0-9]\+[ ]\+[0-9,]\+ K\)/\1#\2/""
- for /f "tokens=1* delims=#" %%a in ('%cmdstr%') do (
- echo ++%%~nxa++ ++PID=%%b++
- if /i "%%~nxa"=="xxoo.exe" (process -a %%b 1000) else (process -a %%b 1111)
- echo ++%%~nxa++|findstr /i "xxoo love fuck cum 6+girls ass bed breasts"&&process -a %%b 1110
- )
-
- :end ==============================================================
- exit /b
复制代码 进程名与PID间用"#"分隔, 详细的进程CPU亲和力自行扩展. |