Do it yourself delete various virus legacy files

Source: Internet
Author: User
Tags exit ini key

Many people say that after the virus was removed and left a lot of body files, although it can be deleted, but they are everywhere, killing one by one is too much trouble.

For example, the _desktop.ini left by Viking, such as the desktop.ini of happy Time, Folder.htt, and the virus often in your hard drive and directory down the attribute for system + hidden Autorun.inf, and this file run= The program behind the field, countless ...

So how do we get rid of this crap? In fact, you can use the search function from the "My Computer" in the scope of these garbage search out, and then CTRL + a Select all, del Delete! Of course, remember to search in the "More advanced options" in the "search for hidden files and folders" and "Search system Folder" Two this place on the hook, otherwise Mao also search!

The above is a method, but the following method will make you feel better, because you will not only kill the damn virus, but also learn something from it, feeling the thrill of the damned files being clicked ... So what are we waiting for, let's get started!

You'll see a batch program that basically consists of a del and a for two commands. The basic framework and principles are simple: use for To loop through all the drives and directories and use Del to delete the target files. First look at the code:

For%%i In (c:,d:,e:) Do cd/d%%i & for Percent J in (filename1, filename2, filenamE3) do DEL%%j/a hs/f/S

ECHO target file deleted, press any key to exit

PAUSE

Code Description:

All uppercase parts are code that is not modifiable in the program, and the red and blue portions can be modified.

Red Section Please change to your current letter, how many to write in how many, the format suit can be (note, the letter should be followed by the English colon, each disk should be separated by the English comma). Please change the blue part to the target file you want to delete, you must have an extension (such as Autorun.inf) and separate it with a comma, if you have only one file, you don't have to write a comma. Please note: Because the execution of the program is deleted, make sure you write the target file is the virus you want to delete the corpse, if you write another file and was deleted, do not come to me!

Save the code as a batch file with an extension of bat or cmd, and then double-click to execute, and you will see the dead bodies of the virus flashing on the screen, no longer found!

Give a specific example, for example, your hard disk has C, D, E, f four disk, you Viking (Sunway), after the virus cleared in each folder after leaving a _desktop.ini file (what, you do not see?) Because the others are hidden, how can this thing be removed by our program? The code is as follows:

For%%i In (C:,d:,e:,f does cd/d%%i & for%%j in (_desktop.ini) do DEL%%j/a hs/f/S

ECHO target file deleted, press any key to exit

PAUSE

If you don't have these body files on your hard drive, but want to test the effect, you can build some of the table of contents, in the inside at random put some files, the red part of the modified for you to build the directory, the blue part of the change for you to put the file, save, run can, you will find those files have disappeared. So if you want to bulk delete some files, you can use this script. Other evolution way, everybody Eight Immortals crossing go!

Or that sentence, to deal with the virus, exercise manual ability is really, anti-virus software is very retarded, or why not the virus to you dispose of the corpse? We have our own hands, we have plenty!



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.