Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to kill the process and delete the batch bat code of the source file

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you how to kill the process and delete the source file batch bat code, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

After double-clicking to run, enter the process name

Batch code:

The code is as follows:

@ echo off color 6e del 1.txt del ildd.txt TASKLIST > > ildd.txt title kills the process and deletes the source file-by:qp cls echo. Echo current process: for / f "skip=3"% I in ('findstr. * "ildd.txt"') do echo% I echo. Please enter the name of the process to be terminated and deleted. For example, echo: 1.exe ping.exe rar.exe set / p command= enter: wmic process get ExecutablePath,Handle | find / I "% command%" > > 1.txt cls for / l% d in (1 14) do echo. Echo the process you entered is:% command% for / f "tokens=1 delims=."%% I in ('type 1.txt') do (the path found by echo is:% i.exe & set "path =% I") echo. Echo presses any key to end the process and deletes the file pause > nul echo. Echo is determined to delete, please press any key. For / l% d in (1 14) do echo. Pause > nul taskkill / f / im% command% del / f "% path% .exe" if not exist "% path% .exe" echo successful: file deleted... Del 1.txt del ildd.txt echo press any key to end the program pause > nul above is "how to kill the process and delete the source file batch bat code" all the contents of this article, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report