A pen drive or USB drive is probably the external storage device you reach for most, and that’s exactly why these drives end up targeted by viruses so often. One of the usual suspects you’ll run into on a USB is the kind that creates shortcut files.
How to fix a shortcut virus?
Just like the name suggests, a shortcut virus is a program that builds a shortcut to a specific file or folder while hiding the original file sitting on your storage drive. This virus mostly targets external storage devices like SD cards, USB drives, and other similar drives.
You’ll typically find these shortcut files being created by Autorun.inf worms and viruses or Trojans.
Types of Shortcut Virus:
1) Flash drive shortcut virus: This is a Trojan virus that sneaks onto the drive and hides there. It then wraps every folder and file into a shortcut that looks just like the drive itself. Click that drive, and the virus replicates and keeps eating up storage space until there’s none left. It’s capable of multiplying itself every single time you open the folder or file.
2) Folders and file shortcut virus: This version hits your pen drive by hiding every file and folder on it and creating a shortcut in their place. You can only get to the files and folders by clicking the shortcut virus, and doing that kicks off more duplication of your files and folders.
When do Files turn into Shortcuts?
- Your computer’s antivirus might have missed the Trojan virus simply because it wasn’t up to date.
- Downloading content from a source you don’t trust can let a virus slip onto your computer.
- If you plug a virus-affected pen drive into a computer without scanning it first, the virus can jump from the PC right onto your USB drive.
These viruses hide every file and folder on the drive and replace them with a shortcut. And here’s the frustrating part. These shortcuts keep popping back up even after you delete them or format the drive. Formatting won’t guarantee you’re rid of the virus either. So if you’re relying on formatting alone, you’re risking your important data.
To get your original files back, you’ll need to fix the problem and recover files from a USB-turned shortcut using proficient USB data recovery software.
Note: The shortcut virus doesn’t give you any real option. It just makes the file inaccessible. But the moment you click into one of those files, or it gets opened, it multiplies itself and keeps going until the entire drive is full.
How To Recover Shortcut Files and Data From USB?
The shortcut virus keeps resurfacing even after you’ve deleted it over and over. Chances are you’ve already tried running antivirus software to get rid of it.
Unfortunately, antivirus tools can’t bring back lost or deleted files. For that, you need a dedicated data recovery tool like SFWare Data Recovery Software to get your data back.
Click the download button to grab the SFWare USB Data Recovery Software and start recovering the data you lost to the shortcut virus.
Download the SFWare USB recovery software and launch the application. Then connect your pen drive or USB drive to the computer.
1: Select the Recover files option from the main screen.
2: On the next screen, pick the drive you want to pull your files from.

4: Right-click the file to preview what’s been recovered, then save it wherever you’d like on your PC.
How can I remove a shortcut virus from a pendrive?
Open Command Prompt as administrator, type the drive letter followed by a colon (for example F:), then press Enter. Run this exact command:
attrib -h -r -s /s /d *.*
That strips the hidden, read-only, and system attributes off every file and folder on the drive, including subfolders. It does not delete the virus. It just makes your real files visible again underneath the shortcuts. You still need to delete the shortcut files themselves afterward, and run a full antivirus scan on the drive before you trust it again.
Windows Defender works fine for this if it is current. Right-click the drive in File Explorer, choose Scan with Microsoft Defender, and let it finish before copying anything new onto the drive. A shortcut virus remover that only deletes shortcuts without restoring the hidden originals will leave you worse off, since you will have removed the only visible pointer to your files without getting the files back. That is the mistake I see most often: people delete the shortcuts first and panic when the drive looks empty.
How can I recover files from a corrupted USB?
A corrupted USB usually shows up differently than a shortcut virus. Windows might ask you to format the drive, or File Explorer freezes the moment you double-click it. I have seen both happen on the same drive within a week of each other, so do not assume corruption rules out an infection, or the other way around.
Start by checking the drive in Disk Management (right-click the Start button, choose Disk Management). If the partition shows up as RAW instead of NTFS or FAT32, that is corruption at the file system level, not a shortcut virus, and attrib commands will not fix it. At that point you need recovery software that can read a RAW partition directly, since Windows cannot browse it normally anymore. Sfware Data Recovery handles RAW drives by scanning sector by sector rather than relying on the file system table, which is what lets it pull files back even when the drive will not mount.
If the USB does mount but individual files will not open or show 0 KB, try copying them to your desktop first before doing anything else. A failed copy with a cyclic redundancy check error means the sectors underneath are damaged, and running CHKDSK at that stage can sometimes make things worse by rewriting the bad sectors. Recover what you can first, repair second.
How To Fix A Folder That Has Become A Shortcut?
Before you delete the shortcut virus, it’s important to fix the affected file first. Here’s how:
Method 1: Show Hidden Files to Recover Files Hidden by Shortcut Virus
Sometimes the virus switches your files to hidden, so you’ll need to unhide them to actually see what’s there.
- Insert your USB or pen drive, then go to My Computers
- Click the View Tab and check the box for Show Hidden Items
Or, if you’d rather, unhide the files or folders using the command line.
- Right-click Start and choose Command Prompt run as administrator.
- Now type F: ( where F is the drive letter)
- Now type the following: attrib -h -r -s /s /d F:\*.* (swap out F for whatever drive letter you want to show hidden files on).
That should unhide the hidden shortcut files. Now head over to the USB drive and check whether all the hidden files show up. Still can’t find them? Try the best recovery method covered in the next section.
Method 2: Delete the Shortcut Files
Once the hidden files are showing on the pen drive, delete the shortcut files using the command prompt.
- Go to Start → click Run → type cmd
- Select your device by typing the assigned drive letter followed by a colon, for example, e: ( where I is the drive letter)
- Next, type del *.lnk
- Type attrib -h -r -s /s /d e:*.*
- Hit Enter
Now check whether your drive is clear of shortcut files. If you still can’t locate your files on the drive, recover your files from a USB drive or pen drive showing shortcuts using the method covered earlier.
Recovering Shortcut Files on Windows 7 and Desktop Drives
If you are trying to recover files from shortcut virus usb windows 7, the attrib command and folder options work the same as on Windows 10 and 11, but the Folder Options dialog lives in a different spot. On Windows 7, open Control Panel, then Folder Options, then the View tab, rather than going through File Explorer’s Ribbon. Select Show hidden files, folders, and drives, and make sure Hide protected operating system files is unchecked too, or some recovered files simply will not appear.
People also ask how to recover shortcut files in desktop folders, not just removable drives. The cause is usually the same Autorun-style infection, but it can reach your desktop through a mapped network drive or an old backup you restored without scanning first. Run the same attrib command against C:\Users\YourName\Desktop instead of a drive letter, and check your Recycle Bin before anything else. Desktop shortcuts created by malware sometimes point to files Windows already moved there during cleanup, so the real copy may be one click away.
Pro Tips to Keep Your Files Safe
A virus can mess with your computer and storage devices in plenty of ways. It can corrupt the pen drive or wipe out the data on it for good. Once a virus has gotten in, recovering shortcut files from a pen drive gets tricky fast. So, to keep yourself out of that situation going forward, here are a few preventive measures worth following.
- Always download files and applications from a trusted source
- Keep antivirus running on your computer, and make sure it stays updated
- Scan the pen drive for viruses before you use it
- Never plug the pen drive into computers that have a high chance of carrying a virus
Frequently Asked Questions:
How can I get shortcut data from a pen drive?
To pull your data out of the shortcut folder on the pen drive, you’ll first need to get rid of the shortcut virus on the drive. The methods laid out in this article will help you fix that.
How can I remove the shortcut virus from my USB?
You can remove the shortcut virus by using the attrib command and deleting the shortcut files from the pen drive.
Why do my pen drive files become shortcuts?
Shortcut files get created by Autorun.inf worms and viruses or Trojans. Once your files are hit by the virus, it creates shortcuts to the folder stored on the drive, each showing 0 kb of data.
How do I delete a shortcut folder?
Using commands in the command prompt, you can delete the shortcut files from the pen drive. If you try deleting shortcut files with the regular delete command, they just come back, so you’ll want to use commands instead to actually get rid of the shortcut virus on the pen drive.



