Home/USB shortcut recovery

Recovery guide

USB Files Turned Into Shortcuts: Recover Them Safely

A flash drive whose folders have all become shortcuts is almost always carrying a shortcut virus. The good news is that your files are usually intact and only hidden. This page walks through recovering them with Windows tools alone, then cleaning the drive so it does not reinfect the next PC.

Editorial TeamNovember 20266 min readLast verified: November 2026

Quick answer

To recover files that turned into shortcuts, do not open any of the shortcuts. Scan the drive with antivirus, then run attrib -h -r -s /s /d X:\*.* in an administrator Command Prompt, replacing X with the drive letter. Your hidden folders return, and you can delete the leftover shortcuts.

At a glance

ProblemFolders replaced by shortcut icons
CauseShortcut malware hides originals
FixScan, then attrib to unhide
Time neededAbout 10 minutes
CostFree
Last verifiedNovember 2026
USB drive full of folders next to a command window restoring hidden files, no people shownIllustration of a USB drive and a command window that unhides folders. attrib -h -r -s

What Is Happening to Your Drive

Shortcut malware moves your real folders into hidden state and creates shortcuts with the same names. Each shortcut points at a hidden launcher, so a double-click starts the infection and then opens the folder to look normal. The data survives because the malware hides it rather than erasing it.

Telling the symptoms apart saves time. If every folder shows a tiny arrow on its icon and the folder size reads a few kilobytes, you are looking at lookalike shortcuts. If the drive reports as empty but used space is high, the originals are hidden.

Breakdown of the attrib command flags used to unhide files on a USB driveattrib with minus h, r, s and slash s, slash d flags on a drive letter. attrib -h -r -s /s /d E:\*.* change flagsunhideclear read-onlyclear system subfoldersfolders tooyour drive Swap E: for the letter File Explorer shows for your drive
The real folders are hidden, not gone.

Recover Hidden Folders With the Attrib Command

Recovery takes five steps: stop opening shortcuts, scan the drive, open an administrator Command Prompt, run the attrib command with your drive letter, then copy the files to the PC and scan again. The command only clears hidden flags and deletes nothing.

  1. Stop opening the shortcutsEvery double-click can re-run the malware.
  2. Scan the driveRight-click the drive and scan with Microsoft Defender or your antivirus.
  3. Open an administrator Command PromptSearch for cmd, then choose Run as administrator.
  4. Run the unhide commandUse the attrib command with your drive letter.
  5. Copy files off and scan againMove recovered files to a folder on the PC.
Command Prompt (administrator), replace X with your drive letter
attrib -h -r -s /s /d X:\*.*

Clean the Drive Before You Reuse It

Cleaning means removing the lure and the launcher. Delete the fake shortcuts after recovery, show hidden items to find the launcher file, and let antivirus remove what it identifies. If the drive still reinfects PCs, copy the files off and format it.

In File Explorer, turn on Hidden items under the View menu. Suspicious launchers are often scripts or executables with a random name sitting at the drive root. Do not run them to see what they do.

Once clean, keep the drive safe going forward. The main guide explains how to turn autorun and AutoPlay off, which reduces automatic launches though not double-click mistakes.

Stop the Next Infection

Prevention rests on habits more than settings: scan unknown drives, show file extensions, and avoid opening anything with a shortcut arrow on a drive that held folders a moment ago. A storage block protects PCs where drives from outsiders should never connect.

Showing file extensions exposes fake names, since a shortcut named Photos still ends in .lnk. A guide to shortcut viruses and BadUSB attacks explains the wider family of tricks.

See USB Block on NewSoftwares.net

Shortcut Virus Questions Answered

Five questions come up most after a shortcut infection: why it happens, whether the files are safe, formatting the drive, autorun settings and deleting the leftover shortcuts. Each answer is short enough to act on directly without reading further.

Why did my USB files turn into shortcuts?

Shortcut malware hides your real folders and drops lookalike shortcut files in their place. Opening a shortcut launches the malware and spreads it. Your data is normally still on the drive, only hidden, which is why recovery usually works without any special software.

Will the attrib command delete my files?

No. The attrib command only changes file attributes, removing the hidden, system and read-only flags so the original items reappear. It never deletes anything. Run it on the correct drive letter, since a typo points it at a different drive.

Should I format the drive to remove the virus?

Formatting is the last resort, not the first. Copy your recovered files to the PC, scan them, then format only if the drive keeps misbehaving. A format erases the drive entirely, so a verified copy of your files should exist before you start.

Does turning autorun off prevent shortcut viruses?

Not by itself. Shortcut malware relies on you double-clicking a fake shortcut, which no autorun setting can stop. Autorun settings help against automatic launching of programs, while antivirus scanning, visible file extensions and careful habits are what address the shortcut trick on a drive you plug in.

Is it safe to delete the shortcut files?

Yes, once you have recovered the hidden originals and scanned the drive. The shortcuts are only the lure, and the real malware usually sits in a hidden executable or script at the drive root. Delete both only after your antivirus has identified them, and never run the leftovers to see what they do.

More Guides on USB Autorun

Each guide in this series owns one question and links to the others for the rest. Pick the next one that matches what you are trying to do, and return to the main guide whenever you need the full overview.

Back to the main guide to disabling autorun for USB drives