Compile and delete the batch processing of virus corpse files by yourself

Source: Internet
Author: User

Many people say that virus cleanup leaves a lot of corpse files, although they can be deleted, but they are everywhere. It is too troublesome to get rid of them one by one.

For example, the _ desktop. ini file left by Viking

For example, desktop. ini, folder. htt

For example, viruses often attribute system + hidden autorun. inf on your hard disk and directory, and programs following the run = field in this file

Countless ......

So how can we get rid of these spam? In fact, you can use the search function to search for the spam from the "my computer" range, and then Ctrl + A select all, del Delete! Of course, remember to check "Search hidden files and folders" and "Search System Folders" in "more advanced options" during the search, or you will not be able to search for the folder!

Okay, the above is a method, but the following method will make you better, because you not only want to get rid of these damn viruses, but also learn something from it, the pleasure of getting rid of the damn files ...... So what are you waiting for? Let's get started!

You will see a batch processing program, basically composed of Del and for commands. The basic framework and principle are very simple: Use for to cycle all the drives and directories, and use del to delete the target file. First look at the Code:

For % I in (C:, D:, e :) do CD/d % I & for % J in (filename1, filename2, filename3) do del % J/a hs/f/s

Echo: the target file is deleted. Press any key to exit.

Pause

Code Description:

All uppercase parts are codes that cannot be modified in the program, and red and blue parts can be modified.

Please change the red part to your current drive letter. You can write as many drive letters as you need. The format is as follows (Note: The drive letter should be followed by a colon, separated by commas ). Modify the blue part to the target file to be deleted. It must contain an extension (such as autorun. inf) and be separated by commas (,). If there is only one file, no comma is required. Note: Because the executed program is deleted, make sure that the target file you write is the virus corpse you want to delete. If you write another file and are deleted, don't try again !!

OK, save the code as a batchcompute file with the extension bat or cmd, and double-click the file to execute it. Then, you will see the virus bodies on the screen flashing, no more information is found!

For example, if your hard disk has four disks, C, D, E, and F ), after the virus is cleared, A _ desktop is left in each folder. INI file (what, you didn't see it? Because they are hidden.) How can we use our programs to delete this stuff? The Code is as follows:

For % I in (C:, D:, E:, F do CD/d % I & for % J in (_ desktop. INI) Do del % J/a hs/f/s

Echo: the target file is deleted. Press any key to exit.

Pause

If you don't have these dead files on your hard disk, but want to test the effect, you can create some directories on your own, put some files in it, and change the red part to the directory you created, change the blue part to the file you saved, save and run it, and you will find that all the files have disappeared. Therefore, you can use this script to delete objects in batches. For other evolutionary methods, let's go over the ocean!

In other words, it is true to deal with viruses and exercise manual capabilities. Anti-Virus Software is very retarded. Why don't you clean up the virus bodies? Let's do it ourselves!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.