站长资源脚本专栏
批处理实现的结束进程并删除文件的代码
简介复制代码 代码如下:@echo off title=结束进程并删除文件[Null] echo.请输入进程名: set /p exe= For /f "tokens=2,3 delims=," %%i In ('wmic process get ProcessId^,ExecutablePath /f
复制代码 代码如下:
@echo off
title=结束进程并删除文件[Null]
echo.请输入进程名:
set /p exe=
For /f "tokens=2,3 delims=," %%i In ('wmic process get ProcessId^,ExecutablePath
/format:csv^|find /i "%exe%"') do (
taskkill /im %exe%
del "%%i" /q
)
pause>nul
@echo off
title=结束进程并删除文件[Null]
echo.请输入进程名:
set /p exe=
For /f "tokens=2,3 delims=," %%i In ('wmic process get ProcessId^,ExecutablePath
/format:csv^|find /i "%exe%"') do (
taskkill /im %exe%
del "%%i" /q
)
pause>nul
下一篇:批量列出所有文件名的批处理