Remove Viruses or Malware Using command prompt “attrib”

“attrib” is a very useful tool to check if your pen drives  have been infected by a virus. The “attrib” is used to set and remove file attributes (read-only, archive,system and hidden).

  1. +s  :- means it is a system file and you cannot delete it just by using the delete command.
  2. +h  :- means it is hidden. so, you cannot delete it.
  3. +r  :- means it is a read only file.so,  you cannot delete it just by using the delete command.

Now we need to set the attributes for example we set  attributes of autorun.inf   to -s -h -r . so, we can manually delete it.

  1. Go to Start Menu > Run.
  2. Type cmd  & Press Enter.
  3. Type attrib -s -h -r autorun.inf ( be sure to include -s -h -r because you cannot change the attributes using only -s or -h or -r alone).
  4. If the autorun.inf file has no more attributes, you can now delete it by typing del autorun.inf .

In case when the all folders in pen drive or hard drive affected by viruses and converted into application which has size of some KB then you can recover those all folders and sub folders using single command.

  1. Go to Start Menu > Run.
  2. Type cmd  & Press Enter.
  3. K: &  Press Enter  ( ‘K’  is  your removable drive ).
  4. K:\>attrib -H -S \*.* /S /D  &  Press Enter.

That’s it ….Now you can see your all folders are recovered and displays its actual size.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s