UXDE dot Net

Remove Virus Using Command Prompt

By -

Hi, friend I know that almost everyone who is using computer must be having antivirus installed on their system and some of them may not. But sometime it happens that your antivirus doesn’t detect virus even though you have 100% doubt that your Pendrive must have virus because you brought your Pendrive from somewhere like cyber cafe, PC from where there is no antivirus installed, etc.

Now in this case you must follow the steps given below to check unwanted files and folder in your PenDrive and delete it.

Note that, this trick can also be use to remove unwanted files/folders from your Drive too.

Follow the steps to remove unwanted Files from your Pendrive/ Drive without opening it:

1. Insert your Virus infect Pendrive and Scan for virus if detected then well and good otherwise go ahead to remove it from command prompt.

In my case it has detected the virus even though I would like show you, how to remove this virus using command prompt?

Malware virus detected

2. As you can see that antivirus installed on my system has detected autorun.inf file.

This is the file; if you try to open it then your system may get infected with virus.

3. So, let us remove it from command prompt without opening PenDrive.

Open command prompt and go to the virus infected drive by typing “Drive name with colon” (H: ) then enter.

Now type attrib -s -h *.* /s /d and enter. And continue by typing “dir” which will show you all files/folders in that drive, as you can see that autorun.inf files is present in this drive.

Autorun file

4. Now if you want to delete it then just type “DEL autorun.inf (i.e. name of file/folder to be deleted)” or rename it to delete it manually.

To rename the file just type in command prompt

REN “Path of files/folder to be deleted” (space) “Name to be given”

Or if you are in that drive using command prompt then type

REN “Name of files to be deleted” (space) “Name to be given”

Rename Autorun file

5. Now you can check that autorun.inf has been rename as useless

File Renamed as Useless

6. Now if you will scan PenDrive then your antivirus won’t show virus in that drive.

Novirus Detected

7. Now if you want, then, you can delete this file after opening the PenDrive/drive. Delete useless file

You may not go for such a large procedure to delete any virus affected file if you have daily updated antivirus. But this is quite useful when one of your folder is giving you trouble by hanging your system when you open that folder.

Please let us know through our comment box, if you have any query regarding this tips.

Hi, I am Ramesh I like to Play trick om my computer and prank my friend, and my field of interest is knowing about latest technology, mobile, graphic, etc. And use it in practical life. You can find Ramesh on , and .

Comments are closed.