@ echo off color 6e del 1.txt del ildd.txt TASKLIST >>ildd.txt title 干掉进程并删除源文件--by:qp cls echo. echo 当前进程: for /f "skip=3" %%i in ('findstr .* "ildd.txt"') do echo %%i echo. 请输入要结束并删除的进程名, echo 如:1.exe ping.exe rar.exe set /p command= 输入: wmic process get ExecutablePath,Handle|find /i "%command%" >>1.txt cls for /l %%d in (1 1 4) do echo. echo 你输入的进程是:%command% for /f "tokens=1 delims=." %%i in ('type 1.txt') do ( echo 找到的路径有:%%i.exe & set "路径=%%i" ) echo. echo 按任意键结束掉进程并删除文件 pause>nul echo. echo 坚决要删除请按任意键…… for /l %%d in (1 1 4) do echo. pause>nul taskkill /f /im %command% del /f "%路径%.exe" if not exist "%路径%.exe" echo 成功: 文件已删除…… del 1.txt del ildd.txt echo 按任意键结束本程序 pause>nul