Virus is a computer program that can copy itself and infect computers. The term “virus” is erroneously used to refer to other types of malware, including adware and spyware programs that do not have the reproductive ability.
A true virus can spread from one computer to another (in some form of executable code). One of the ways by which a virus can infect your PC is through USB/Flash drives. Common viruses such as ‘Ravmon’ , ‘New Folder.exe’, ‘Orkut is banned’ are spreading through USB drive. Most anti virus programs are unable to detect them and even if they do, in most cases they are unable to delete the file, only quarantine it. So in our post we use command prompt to remove harmful files that any anti-virus can’t.
Follow the below guide only if you think any of your drive is affected with virus or if you think there are some harmful files and you want to delete them.
Step 1: Go to start menu and type “cmd” in the search box or Start>all programs>accessories>command prompt.
Step 2: Select the infected drive,to do so type in CMD , D: to go to D: drive.
Step 3: Now type dir/w/a . It will show all the files of the drive including hidden files.
Now Check if there is any file or virus that you are not aware of and you think might be Harmful to your PC.
Step 4: Usually there is Autorun.inf file which you must delete it. to do so Type in attrib -h -r -s autorun.inf and press Enter. Type del autorun.inf and press Enter. Follow this for all other drives.
Step 5: We have now Succesfully found and deleted autorun.inf file from D drive. if you find any .exe file which is unknown to you. then delete it using the same above method.
NOTE: Using command prompt we can remove viruses from our USB drive, memory card, in fact, any drive in a windows computer using CMD. We will use a famous CMD command known asattrib. before using it, it’s better to have a basic knowledge about this command. Here are the basic attributes of theattrib command which we will use to remove the virus from drive.