> How to > File Recovery > Remove Shortcut Virus from USB Flash Drive/Pen Drive/Hard Drive/SD Card Using CMD

Remove Shortcut Virus from USB Flash Drive/Pen Drive/Hard Drive/SD Card Using CMD

Updated on Nov 21, 2018 by Abby Haines to File Recovery

Summary

When the shortcut virus infects a device, all the files therein become inaccessible. To access your files, you can remove the shortcut virus from your USB drive, pen drive, or SD card using cmd. This method is preferred over formatting the device and losing all files. If the virus or removal process resulted in some data loss, you can get your files back with data recovery software.

The Shortcut Virus

The shortcut virus is a frustrating piece of malware that replaces all files in a storage device with shortcuts. These shortcuts have the same names as the files, but the files are inaccessible. In fact, when you click the shortcuts, the virus only embeds itself deeper into the storage device. Your USB hard drive, SD card, hard drive, or other devices become infected with the shortcut virus when they are connected to another device that already has the virus. Additionally, in the case of a computer's hard drive, it can become infected by running a .exe file that contains the virus.

Shortcut Virus Removal with Command Prompt

In order to access your files on an infected device, you should first remove the shortcut virus from the USB drive, SD card, or hard drive. Formatting is a simple method to clean out the shortcut virus, but you will lose all of the data on your device. Fortunately, there is another relatively simple method that will allow you to remove the shortcut virus completely for free—using the Windows built-in Command Prompt (cmd).  

By using cmd, you can completely remove the shortcut virus from a USB flash drive, SD card, or other removable storage devices. If your computer’s hard drive is also infected with the shortcut virus, you can use this method to get rid of the virus files, but must additionally remove shortcut virus processes from the registry to prevent the virus from reappearing. Permanently removing the shortcut virus from a computer hard drive is covered in an associated article. 

Remove Shortcut Virus from Removable Storage Devices with cmd

Warning
Be careful when using cmd. If you are not sure how to operate the command line, only enter commands from trusted sources. Improper use of cmd can result in serious damage to your system.
  • Step 1: Right-click on "Start" and select "Command Prompt (Admin)".
  • Step 2: Sign in with your administrator account and password if the system asks.
  • Step 3: Type: attrib -h - r -s  /s /d D:\*.* and hit Enter. (Replace D: with the drive letter of your infected device).
  • Step 4: Type: del autorun.inf and hit Enter.

If this didn’t work, you are likely infected by another virus. Replace autorun.inf with another virus extension such as *.ink or *.exe to delete these suspicious files. 

By now, you should have successfully removed the shortcut virus from your USB flash drive, pen drive, or SD card using cmd. This method is preferred over formatting your device because it can get rid of the virus without wiping all of your files. But using cmd in this manner can sometimes result in minor data loss, so it is recommended to check your device for any missing files. This process is made easy by using automated data recovery software to scan your device and locate deleted files. 

Supplemental: recover data after removing shortcut virus

EaseUS file recovery software scans deep into the data blocks of your storage device and locates any recoverable files that were lost due to deletion, formatting, or other errors. The scan is completely free, so you have nothing to lose by checking your drive for missing files. You’ll be able to view all recoverable files and preview the quality of the data before recovering. In fact, if you only have a small number of lost files, you can recover them for free with EaseUS Data Recovery Wizard Free.

 

Step 1: Launch EaseUS Data Recovery Wizard.

Select the disk partition or storage location where you lost files and click "Scan".

Run file recovery software.

Step 2: EaseUS Data Recovery Wizard will start a scanning process to find lost files.

The scanning process will automatically start to find all of the files.

Scan and find lost files.

Step 3: Preview and restore lost files.

You can filter scan results by file type, select found files and click "Recover" to get them back. You should save the files to another safe spot in your PC/storage device, not where they were lost from.

Restore virus deleted files.