How to remove virus using CMD
Each file and folder have the following attributes:
1). Archive A
2). Read Only R
3). Hidden H
4). System S
– (minus) sign prior to an attribute it means removing attributes and +(plus) sign mean giving attributes to the file or folder.
Example) attrib -r -a -s -h file.txt this will eliminate all attributes from file.txt and attrib +r +a +s +h file.txt will give all attributes to file.txt.
If pen drive or other hard drive is infected by virus, Command prompt is the most excellent option. Follow the steps given below.
1). Go to the command prompt by start>all programs>accessories>command prompt or What you can do is press windows key+r and enter cmd .
2). Go to the drive wherever you want to delete virus example write f: to go to F drive.
3). Type “attrib -r -s -h *.* /s /d” without quotations and press enter.
4) Press dir /a.
5). Delete all the .inf, .exe, .dll, .log extension file if they are not your files by using DOS Del command.
Example: How to remove virus using CMD
Del autorun.inf How to remove virus using CMD
If any file is not deleting rename that file by rename command
Example: rename dst.exe ms.bak this will rename dst.exe to ms.bak
Now your pen drive is virus free. How to remove virus using CMD