How to Remove Shortcut Virus from in Windows 10/8/7 using CMD

If your external devices like USB flash drive, external hard drive, or SD memory card is infected with a shortcut virus, you need to remove the virus immediately. The infection spreads whenever you plug the external device into a Windows PC. To remove the shortcut virus using CMD, follow the steps below

Step 1. Connect your external hard drive to PC

Step 2. Note the drive letter for the USB

Step 3. Search Command Prompt in the Search box 

Step 4. Start the CMD with your administrator

Step 5. Enter password is it asks for one

Step 6. Type the following command and hit “Enter”.

attrib -h -r -s /s /d X:\*.*

 

Note: Replace X: with the drive letter of your USB drive

Explanation

Command

Meaning

-s

Removes the “system file” status from all matching files and folders.

-r

Removes the “read-only” status from all matching files and folder.

-h

Removes the “hidden” status from all matching files and folders.

/s

Makes the command recursively apply to all files and folders in the current directory and all subdirectories, basically the entire device in this case.

/d

Makes the command apply to folders as well (typically attrib only handles on files).

*.*

Means all file names and folder names should be considered a match.

Leave a Reply

Your email address will not be published. Required fields are marked *