Remove virus from PC using cmd [Quick Steps]

Remove Virus from PC

  Messing up with some virus ? Though your antivirus software removes virus and problem persists, searching google for the removal and you are into a perfect site for a solution. Here are perfect steps to remove 1. Autorun Virus, 2. Shortcut Virus, 3. Empty Folder Virus using CMD (Command Prompt)

How to remove autorun virus using cmd ?

              Autorun Virus Exploits into the Windows OS whenever an External device containing Autorun Virus is pluged in to Windows PC and Autorun is Performed, Then the Autorun.inf will be executed and replicates copies of this Autorun.inf file and .exe files too. This creates a serious mess with files, Follow the steps beow to remove this autorun virus from PC using CMD.

Steps to Remove Autorun Virus :

  • Press ( Start or winkey ) -> Run -> cmd.
  • If you are at the root directory ( C drive ) then do the following, else give cd.. and come to the root C:> and do the following. 
  • Type in ( attrib -h -r -s autorun.inf ), without brackets and press Enter.
  • Type ( del autorun.inf ), without brackets and press Enter.
  • Follow this for all other drives. 

How to remove Shortcut virus using cmd  ?

These Shortcut viruses are those which converts all your data inside your pen drive or Hard disk to shortcuts, and which are recoverable.

Steps to Remove Shortcut Virus : 

  • 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 a gentle Enter.
          How to remove shortcut virus in Pen drives in Windows ?

Recover your files from Shortcut Virus: ( 2nd Method)

     You can recover your files through Winrar.

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

How to remove empty Folder virus using cmd  ?

   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?
Steps to Remove Empty Folder Virus : 
  • 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 a gentle Enter.


           Do a restart, and before that don’t open any drives after performing the following steps.  

51 thoughts on “Remove virus from PC using cmd [Quick Steps]”

  1. Anonymous says:

    it said access denied, what to do?

  2. Anonymous says:

    thnx …

  3. Anonymous says:


  4. Anonymous says:

    it worked for me thnx but after doing this in folder options in view option both radio butttons are enabled.i.e for “show” and “do not show hidden files radio buttons”.can any one help me?

  5. Anonymous says:

    I ran cmd to remove shortcut virus on drive D but when i typed the drive it said Access is denied. What can i do?

  6. kristoffer_dead says:

    hello, thank you for helping us. but i’m having trouble with mine.
    when i try your instruction on “How to remove Shortcut virus” and done typing “del *.lnk” it answers “the request could not be performed because of an I/O device error.”
    please help me with this :(

  7. Anonymous says:

    tnx. it works for me.

  8. Anonymous says:

    shortcut virus works…thanks!!!!

Comments are closed.