How to Find & Remove Viruses in Windows using Command Prompt

Finding & Removing Viruses Using Command Prompt

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.

How to remove Shortcut virus using cmd ?

The Shortcut viruses are those which converts all your data from your pen drive or Hard disk to shortcuts, but they are recoverable. just follow the below given steps to remove shortcut virus from pen drive and recover back your files.

  • Go to Start -> Run -> cmd.
  • Go to your pen drive directory.
  • Type this command: del *.lnk and press Enter.
  • Type attrib -h -r -s /s /d e:\*.* And then press Enter.

Recover your files :

You can recover your files through Winrar.

  1.  Open WINRAR Application.
  2. Navigate to your Pendrive location or PC Folder location.
  3. Copy Files and Paste where you want.
  4. Format your Pendrive. 

Got some Files in your pen drive but they are empty! Because of the virus in your pendrive malfunctions your drive. How to remove this empty folder virus and recover files? Follow the steps given below.
  • Start -> Run -> cmd.
  • Type this command: attrib -h -r -s /s /d x:\*.* 
  • Here the letter "x" should be replaced with the drive alphabet of your pendrive that you have inserted into the computer.
  • If your pendrive shows the drive alphabet as "J", then type  this command: attrib -h -r -s /s /d j:\*.* And then press Enter.

Restart your Pc for the changes to take place... So these were some methods to find and remove different viruses using Command Prompt. I hope this will help many of my Readers.
Next Post Previous Post
No Comment
Add Comment
comment url