How to Remove USB Shortcut Virus: The Ultimate Guide
Aug 04, 2026 • Filed to: USB Recovery • Proven solutions
You can remove a USB shortcut virus and restore hidden files without formatting by executing specific command-line instructions, provided you also clean the originating source PC to prevent immediate reinfection.
● Run a custom `.bat` file containing `del *.lnk` and `attrib -s -r -h [Drive Letter]:\*.* /s /d /l` to safely delete the malicious shortcut links and unhide your original files directly on the infected drive.
● Stop the virus from spreading back to the USB by deleting suspicious keys in the host computer's Registry Editor under `HKEY_CURRENT_USER > Software > Microsoft > Windows > Current Version > Run` and ensuring Windows Defender Real-time protection is active.
● Formatting the USB drive to an NTFS file system will definitively erase the Trojan, but this action wipes all data and requires subsequent use of recovery software like Wondershare Recoverit to retrieve your files.
Ask AI for a summary
USB shortcut virus is a type of malware that infects your USB drive in a manner that makes your files inaccessible. This Trojan hides all your files and replaces them with the shortcuts having the same name. These shortcuts are inaccessible and you can easily spread the virus once these links are clicked. To remove USB shortcut virus, you can find 4 methods in this article.
How to Remove Shortcut Virus in USB Drive?
Many processes can be followed to make sure that the virus is removed from the drive completely. These processes are easy to perform and also make sure that the result is 100%. In this section, we will take a look at the most used processes that work. You can also search for USB shortcut virus remover online to resolve the issue.
Method 1: Remove the Shortcut Virus Using CMD
This is another important and state of the art process to remove USB shortcut virus using CMD. The best part is that all the tools required for the process are built-in to remove the USB shortcut virus and there is no need for any further installations. Remove shortcut virus from Pendrive using CMD through the process as under.
- To start pen drive shortcut virus remover through CMD, press Windows + R key to access the Run dialogue box. Type in CMD to access the command prompt. To remove the pen drive shortcut virus using CMD this is the first step.

- Write the name of your USB drive such as G: E: or whatever the name is and press enter.
- Type ATTRIBUTE -H -R -S AUTORUN.INF in the prompt as it is the command to remove shortcut virus in pendrive and press enter once again.

- Type DEL AUTORUN.INF and press enter.

Method 2: Remove Shortcut Virus from USB Using BAT File
You can easily remove the shortcut virus from your USB drive by creating and running a simple BAT file. Here are the steps:
- Connect your USB drive, pen drive, or SD card to the computer. Right-click on the desktop, select New -> Text Document to create a Notepad file.
- Open the Notepad file, copy and paste the following code:
@echo off
del *.lnk
attrib -s -r -h G:\*.* /s /d /l
@echo complete
Note: replace G: with the actual drive letter of your infected USB drive. - Click File -> Save As. Change the file extension from .txt to .bat.
- Select "All Files" as the file type and save it to your desktop.
- Double-click the .bat file to execute it. Then, wait for the process to complete.
Method 3: Use the USB Shortcut Virus Removal Tool
Many antivirus software programs can be used to remove the virus completely. For the users that are facing this issue getting a reliable antivirus would be a sigh of relief. Just for reference, the below-mentioned process could be executed to remove the USB stick shortcut virus.
- Download and install the antivirus program.
- Open the program once it has been installed and go for the Scanning of the system.
- The antivirus will not only remove the shortcut virus but will also list other viruses on the next interface.
- You can also clean the shortcuts of the program to make sure that the virus is removed completely from the system.
Method 4: Remove Shortcut Virus from the Source PC
Since shortcut viruses often spread from infected computers to external drives, cleaning the source PC is crucial. Follow these steps to eliminate the virus completely.
1. Disconnect All External Drives
Stop using infected USB drives, SD cards, or external HDDs immediately. Continued use can spread the virus further, risking more data loss. Safely eject and unplug all external storage devices.
2. Clean the Shortcut Virus from Your PC
Since the virus originates from the computer, removing it at the source is essential. Here’s how:
Step 1. Enable Windows Firewall
- Go to Control Panel->Windows Defender Firewall->Turn Windows Defender Firewall on or off.
- Check the box "Turn on Windows Defender Firewall" and click ok to confirm.

Step 2. Activate Virus & Threat Protection
- Open Settings->Update & Security->Windows Security.
- Click Virus & threat protection->Manage settings.
- Enable the options: Real-time protection, Cloud-delivered protection, and Automatic sample submission.

Method 5: Delete Suspicious Keys in Registry Editor
The process to fix flash drive shortcut virus is explained as under.
- Press Windows + R and type Regedit to enter the registry settings of your PC.

- Follow the path HKEY_CURRENT_USER > Software > Microsoft > Windows > Current Version > Run. Delete all the suspicious keys that you can locate here to repair the shortcut virus Pendrive.

- Again press Windows + R key and type MSConfig to access the configuration of the windows.

- Disable everything under the startup tab except the anti-virus software. Click OK and restart the PC to remove the shortcut virus flash drive.

Method 6: Format The USB Drive to Remove Virus
This is by far the easiest way to delete shortcut virus from USB. It will make sure that you get the outcome in line with your requirements. The process that you need to follow in this regard is as under. It will also let you know the virus that creates shortcuts on USB.
- Press Windows + E to access the file explorer. This interface will be having your USB drive listed on it.

- Right-click on the USB drive and select format.

- Select the NTFS file system on the interface that appears. Change the volume label if necessary and don’t forget to check Quick Format as otherwise, you could get a delay in formatting. Press Start > Yes to confirm your choice and format the USB drive and remove the USB flash drive shortcut virus.

Bonus: How to Recover Lost Data after Removing the USB Shortcut Virus
Recoverit Data Recovery is one such program that will allow you to recover files from USB shortcut virus. It is a highly viable program that will make sure to recover your data lost for any reason. From usability of the program is high and therefore it has been rated high by the users.

Recoverit Data Recovery - The Best File Recovery Software
- The program supports 1000+ formats as well as data types which make it easy for you to recover data.
- Whatever the reason is for the data loss the Recoverit Data Recovery will recover it completely.
- The videos are kept intact once they have been recovered.
- The deep scan gives you access to root directories to recover the data that is not possible otherwise.
- Preview the files before they are recovered and choose only the ones that you want to have.
Step 1: Fire up your program
Launch the program once it has been installed on your system.

Step 2: Select location
Select the location which you want to scan for the data recovery. In most cases, it is an external storage device.

Step 3: Start Scanning
Scan the location thoroughly to get back your data.

Step 4: Preview the files
Preview the files that you want to recover. Keep or recover the ones that you want and you can delete the others. This also completes the process in full.

Related Video >>: How to Fix a Corrupted USB and Recover Data?
What Is a USB Shortcut Virus?
In simple words shortcut virus in USB is a worm or a Trojan that hides your file. There are many reasons for which your USB can get affected by the virus. The worst part of this virus is that once it has been double-clicked it multiplies itself and therefore infects your system to a great extent. The processor of your system gets into constant working and thereby the system performance is degraded. Below are some reasons that will help you fix the USB shortcut virus.
- USB used with infected system
At times there are systems that are already infected with the USB drive shortcut virus. If you connect the USB with any such systems the chances are that it will get infected. The files in the USB drive will be hidden and the virus will then spread to the other systems as well. You must know this reason thoroughly to remove the pen drive shortcut virus.
- Online Malware
This malware is known to have infected systems all over the world daily. This is one of the basic reasons for which the USB and other storage devices get infected. To remove shortcut virus from a flash drive you must consider this fact. Get a good pen drive shortcut virus remover tool to resolve the issue.
- Other infected USB
If you get a USB drive from any source try to scan it with the anti-virus to make sure that the virus is detected and removed. It is always recommended to use the other storage devices with great caution so that you never face any issue. To remove the shortcut virus on Pendrive keep an eye on data transfer.
- Anti-Virus not Active
If you are having a free version of the anti-virus software then it is advised to upgrade it to remove shortcut virus in Pendrive. The free versions of the antivirus software programs only detect the virus but do not remove it at all. The right antivirus should be installed on the machine so that it acts as USB shortcut virus remover software.
- Storage Corruption
If the storage from where the data is being transferred is corrupted then it can spread the virus to other storages as well. The corruption of the storage means that it has bad sectors on it. This requires a deep scan to be conducted to make sure that the malware is removed. Malware removal can also be done by scanning the USB drive. It will allow you to remove shortcut virus on USB.
Conclusion
Recoverit Data Recovery is the only program that will make it easy for you to recover the data lost as a result of a virus creating a shortcut in flash drive. The program is highly sophisticated and has a very user-friendly interface. The use of the program is easy and it does not let you down at all. Once you use the flash drive shortcut virus removal tool get this program to recover your data completely.
People Also Ask
-
What is a USB shortcut virus?
A USB shortcut virus is a type of malware that hides your files and replaces them with fake shortcuts. When clicked, these shortcuts may spread the infection or trigger malicious actions. -
How do I know if my USB is infected with a shortcut virus?
There are some signs that can tell: Files appear as shortcuts (.lnk). Original files are hidden or missing. USB runs slower than usual. Antivirus alerts about suspicious activity. -
Can I recover my files after removing the shortcut virus?
Yes, you can recover hidden files using: 1. Command Prompt (attrib command) 2. File Explorer (Show hidden files option) 3. Data recovery software like Wondershare Recoverit (if files were deleted) -
Does formatting the USB remove the shortcut virus completely?
Yes, formatting erases all data, including the virus. However, it should be a full format (not quick format) to ensure complete removal. -
How can I prevent USB shortcut viruses in the future?
1. Scan USB drives before opening files. 2. Keep your antivirus & Windows Defender updated. 3. Disable Autorun for external drives. 4. Avoid using unknown USB devices on your PC.
USB Solution
- Recover USB Drive
- USB recovery | top tools.
- USB recovery | formatted.
- Data recovery | flash drive.
- Data recovery | pen drive.
- Data recovery | memory stick.
- Recover Virus Infected USB.
- Format USB Drive
- Fix/Repair USB Drive
- Repair corrupted USB drive.
- USB not recognized? Fixed!
- Fix unknown USB device.
- Pendrive not detected.
- Know USB Drive

Sue Wayne
staff Editor