dwz 当前离线
四级士官
zqz0012005 (smile)当前离线
假装是个高手
荣誉版主
TOP
batman 当前离线
考官
@echo off echo 请输入你要保留的进程名(不含后缀),中间用空格格开 set /p code=在此输入: for %%i in (%code% tasklist) do set "_%%i=a" for /f "delims=" %%i in ('tasklist^|findstr "exe"') do ( if not defined _%%i taskkill /im "%%i" /f>nul )复制代码
terse 当前离线
中将
@echo off echo 请输入你要保留的进程名,中间用空格格开 set /p code=在此输入: for /f "delims=" %%a in ('tasklist^|findstr "exe"') do ( for %%i in (%code% tasklist) do if /i "%%~na" neq "%%~ni" set "flag=a" if defined flag taskkill /im "%%a" /f>nul&set "flag=" )复制代码