3

Windows常用批处理脚本

 2 years ago
source link: https://juzq.github.io/posts/windows_commonly_used_batch_script/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Posts Windows常用批处理脚本

Windows常用批处理脚本

Feb 24, 20212021-02-25T00:00:00+08:00 by JuZi

批量停止进程

:: ------------------------------------------------------------------------------
:: Author : Juzi
:: Date : 2021/02/24
:: Description: 批量停止进程
:: ------------------------------------------------------------------------------

@echo off

:: 进程名(不包含.exe)
set process=Dante

set list=tasklist /fi "imagename eq %process%.exe" /nh
for /f "tokens=2" %%i in ('%list%') do (
    ::echo %%i
    taskkill /F /PID %%i
)

pause

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK