gpt4 book ai didi

batch-file - 使用 BATCH 关闭所有 firefox 选项卡

转载 作者:行者123 更新时间:2023-12-05 01:21:15 26 4
gpt4 key购买 nike

如果有多个 firefox,我会尝试关闭所有 firefox。我想循环检查 firefox 进程并关闭并再次检查,直到没有任何 firefox 进程。

这是我的代码:

:loop
taskkill /im "firefox.exe"
tasklist /fi "imagename eq firefox.exe" goto loop

这个命令哪里错了?感谢您的帮助。

最佳答案

:loop 
tasklist /fi "imagename eq firefox.exe" | find "firefox.exe" >nul && ( taskkill /im firefox.exe >nul & goto loop )

获取任务列表,如果其中包含firefox.exe,则终止它并转到循环

关于batch-file - 使用 BATCH 关闭所有 firefox 选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20143228/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com