If your USB drive suddenly shows shortcuts instead of your photos, documents, or folders, do not open those shortcuts. Some USB malware hides the original folders and creates look-alike .lnk files. In that situation, your data may still be on the drive. In other cases, files have actually been deleted or damaged, and simply showing hidden items will not restore them.

To recover files from a USB shortcut virus, first check the computer and USB for malware without running the suspicious shortcuts. Then look for the original hidden folders in Windows 11 or 10. If the originals are still present, copy them to a different, clean drive. If they are genuinely missing, a data recovery scan may help when the USB is still readable. Do not format the USB or run repair commands before protecting important data.

In This Article
    1. Show Hidden Items in File Explorer
    2. Use Command Prompt to Restore a Known Hidden Folder
    1. Check Whether a Recovery Scan Is Appropriate
    2. Scan, Preview, and Save the Files to Another Drive
    1. The Shortcuts Return After You Unhide Files
    2. The USB Has Used Space, but No Original Files Appear
    3. Windows Asks to Format the Drive or Cannot Detect It

Part 1. Are Your USB Files Hidden or Actually Missing?

A shortcut virus is a common name for malware that may hide original USB folders and place deceptive shortcuts in their place. A shortcut is not the file it points to. Opening an unfamiliar .lnk, .exe, or script file on a potentially infected USB can run unwanted code instead of opening your documents.

Use what you can see on the drive to choose the least risky recovery path:

What you see What it may mean Safer next step
Folders have become .lnk shortcuts, and storage space is still occupied The original folders may have been hidden; used space alone does not prove this. Scan for malware, then inspect hidden files and folders.
A familiar filename now ends in .exe, .vbs, or .bat It may be a malicious program or script rather than your original file. Do not run it; have Windows Security inspect the drive.
No original files appear even after showing hidden items Files may have been moved, deleted, or obscured by system attributes. Check the drive read-only first, then consider targeted attribute changes or recovery.
The USB prompts for formatting, shows RAW, or frequently disconnects A file-system or hardware problem may exist in addition to, or instead of, malware. Do not format or repair first; protect important data and assess device health.

Important: A flash drive showing used space does not guarantee that your missing files remain intact. Likewise, a virus scan can remove malware, but it does not automatically restore a deleted document. Treat malware removal and data recovery as two separate tasks.

Part 2. Protect Your USB Before Trying to Recover Files

Before trying any file-recovery command, avoid new writes to the USB. Do not download tools onto it, create files on it, or agree to a format prompt. If the drive contains irreplaceable data and is disconnecting or showing physical faults, stop repeated attempts and consider a professional recovery service.

  1. Do not open the suspicious shortcuts. Leave unknown .lnk, .exe, .vbs, .js, and .bat files alone. If you already opened one, disconnect the USB and assess the computer with your security software before reconnecting it.
  2. Use a trusted Windows 11 or Windows 10 computer. Make sure its antivirus protection is enabled and its security updates are current. In Windows Security > Virus & threat protection, run a scan of the computer. Use Scan options if a broader or custom scan is needed. You can also right-click the removable drive in File Explorer and choose the available security-software scan action.
  3. Review detections instead of indiscriminately deleting files. Follow your security software's instructions for confirmed threats. If you are unsure whether a detected file contains unique data, seek qualified help before permanently deleting it.
  4. Copy readable personal files to a different healthy location. After security checks, if the actual photos, documents, or folders are accessible, copy them off the USB. Check the copies with security software before opening them. Do not copy suspicious executable or shortcut files as a substitute for the originals.

Microsoft documents scan options in its Windows Security guidance. If threats repeatedly return, follow that guidance for more extensive or offline scanning rather than randomly deleting registry keys or startup entries.

Part 3. Recover Hidden Files from a USB Shortcut Virus in Windows

Try these methods when Windows still assigns the USB a drive letter and you have reason to believe the original files are present. Start with File Explorer because it only changes the viewing setting. Use Command Prompt only after you have checked the correct drive and know which folder belongs to you.

Show Hidden Items in File Explorer

Step 1. Connect the USB to a trusted, security-checked Windows computer. Open File Explorer > This PC and note the USB drive letter and capacity. For example, the drive might appear as USB Drive (E:).

Step 2. On Windows 11, choose View > Show > Hidden items. Also enable View > Show > File name extensions so you can distinguish a document from an executable or shortcut. On Windows 10, open the View tab and select Hidden items.

show hidden items

Step 3. Look for your actual folders and file extensions, such as .jpg, .docx, or .pdf. Do not launch similar-looking .lnk or .exe files. If your originals appear and security checks are clear, copy the files to another healthy drive and open a few copies to verify them.

If nothing appears: Hidden items does not necessarily reveal folders also marked as system items. Continue with the read-only check below rather than formatting the USB. The image above illustrates the older Windows 10 interface; the Windows 11 menu path is described in Step 2.

Use Command Prompt to Restore a Known Hidden Folder

The Windows attrib command can display or change the Hidden and System attributes of existing files and folders. It cannot recreate a file that has been deleted. Use the following example only when the USB is readable, your security check is complete, and you have identified the folder you want to restore.

Step 1. Confirm the drive letter and inspect its contents without changing them. Open Command Prompt from the Windows Start menu. Replace E: with the actual letter shown in This PC and enter:

dir /a "E:\"

The /a switch lists entries regardless of attributes. Look for the name of a folder you recognize, such as Photos. Skip unfamiliar scripts, suspicious shortcuts, and Windows-managed folders such as System Volume Information.

Note: The example below uses G: and dir /ah to list only hidden items. Use dir /a as shown above to list all entries. The system folder in the example is not a personal folder to restore.

command prompt listing hidden entries on a usb drive

Step 2. Inspect that folder's attributes. If you can identify your own folder, enter its exact path (including quotation marks if the name has spaces):

attrib "E:\Photos"

In the output, H denotes Hidden and S denotes System. If the folder is not listed at all, this command cannot recover it; move to the recovery decision in Part 4.

command prompt displaying hidden and system file attributes

Step 3. Clear the attributes on that known folder only. When the target folder is yours and the device is healthy, first clear its own System and Hidden attributes. If its contents remain hidden, apply the second command to the files and subfolders inside that same confirmed folder:

attrib -s -h "E:\Photos"
attrib -s -h "E:\Photos\*" /s /d

The first command targets only the Photos folder. The second uses * to match its contents; /s includes files in subfolders and /d includes directories. Both remove System (-s) and Hidden (-h) attributes. These commands change attributes on the USB, so do not use them on an unstable drive or run them across every file in the USB root. The syntax follows Microsoft's attrib command reference.

command prompt removing hidden attributes from a named folder and its contents

Step 4. Verify and copy. Return to File Explorer. If the original folder appears, copy its personal files to a different clean disk. If you get Access is denied, the folder does not exist, or the files still do not appear, stop repeating the command; check the actual path and continue to Part 4 where appropriate.

file explorer copying selected usb files to a folder on the computer
Free Download
Free Download

Part 4. Recover Missing USB Files with Wondershare Recoverit

If the original documents are genuinely missing after the hidden-file checks, a recovery scan may be useful. This is different from removing the infection: Wondershare Recoverit scans a readable storage device for recoverable data; it is not an antivirus program and cannot make malware safe to run.

Check Whether a Recovery Scan Is Appropriate

Consider Recoverit USB data recovery if Windows can still detect the USB and files may have been deleted or lost after malware cleanup. Recoverit supports logical data-loss workflows on detectable USB storage, but it cannot guarantee recovery of overwritten data or fix a physically failed device. If the original folder is simply hidden and can be copied safely, you do not need a file-recovery scan.

Before scanning: Connect the USB to a trusted computer, avoid writing to the USB, and prepare a separate healthy destination with enough free space. If the drive repeatedly disconnects, reports 0 bytes, or appears physically damaged, do not subject it to repeated scans.

Scan, Preview, and Save the Files to Another Drive

The following workflow follows the current official Recoverit for Windows user guide. Menu names can vary slightly with platform and installed build.

Step 1. Select the original USB. Launch Recoverit on the trusted computer and open Hard Drives and Locations. Find the detected USB drive under the available external devices and select that device, not the computer's internal disk. Start the scan.

select the external usb drive in recoverit

Step 2. Let the scan search for lost files. Keep the USB connected while Recoverit searches. You can narrow results by file type or name as supported by the interface. Allow the scan to complete when possible, especially when important files have not yet appeared.

scan the selected external drive in recoverit

Step 3. Preview likely matches. Check file names and preview supported photos or documents before selecting them. A listed filename alone is not proof the recovered file is complete or usable.

preview and recover files

Step 4. Recover to a different drive. Select the files you need, choose Recover, and save them to a healthy computer drive or a second external drive. Do not save them back to the infected USB. Check a sample of the recovered files before making any repairs to the original device.

choose another drive to save recovered files
Free Download
Free Download

Part 5. What to Do When the Files Still Do Not Appear

Different results call for different next steps. Repeating a malware-cleanup command will not restore deleted data, and running disk repair on a drive with irreplaceable files can make later recovery harder. Use the branch that matches what you actually observe.

The Shortcuts Return After You Unhide Files

If new shortcuts reappear after you reconnect the USB, treat the computer or another device as potentially infected. Stop opening shortcuts, update security definitions, and run a full or, when advised, Microsoft Defender Offline scan on the computer. Review security detections before reconnecting the USB. For the system-cleanup workflow, use Microsoft's Windows Security scan options. Do not make blanket Registry edits or disable all startup services.

The USB Has Used Space, but No Original Files Appear

Used space can include hidden files, system metadata, or unrelated data. Check the correct drive letter and confirm the actual original folder names with dir /a. If your folder does not exist, do not create a replacement on the USB. If the drive is otherwise readable and the data may have been deleted, a recovery scan is the appropriate next option. For general missing-file situations that are not clearly caused by shortcuts, see recovering files from a virus-infected USB drive.

Windows Asks to Format the Drive or Cannot Detect It

If Windows asks to format the USB or identifies the volume as RAW, cancel the format prompt. Do not run CHKDSK /f, initialize the drive, or change partitions before preserving valuable data. Microsoft's CHKDSK documentation confirms that repair switches modify the volume; that makes them different from the read-only inspection described earlier.

If the device is stable and detected, assess whether a recovery scan or a professional service is the safer path. If it is not recognized at all, repeatedly disconnects, gets unusually hot, or appears physically damaged, stop software attempts and contact a qualified recovery specialist. A scanning application cannot repair failed USB hardware.

Part 6. Check the Recovered Files and Prevent Reinfection

After copying or recovering files, make sure the destination is on a clean disk. Scan the copied folder using trusted security software before opening it. Then open a few representative photos, documents, and videos to confirm that their contents are readable; a filename in a results list does not guarantee a successful recovery.

  • Keep File name extensions visible so suspicious .lnk and .exe files are easier to distinguish from real documents.
  • Do not run unfamiliar scripts, shortcuts, or installers from removable media.
  • Keep Windows and your security software updated, and check computers before transferring files to the USB.
  • Maintain a separate backup of important files. A successful scan is not a substitute for a backup.

If the USB remains unstable, postpone formatting or reuse until the important originals and their copies have been verified. Once your data is safe and the malware problem has been addressed, you can decide whether the device itself is trustworthy for future storage.

Conclusion

When a USB drive turns your folders into shortcuts, start by treating the shortcuts as unsafe and checking whether the original files are simply hidden. If the folders still exist, Windows File Explorer or a carefully targeted attrib command may reveal them so you can copy them elsewhere. If the data is actually missing, Recoverit may be worth trying on a readable USB, with recovered files saved to a different disk. Do not format, run repair commands, or assume the virus is gone until you have protected and checked your files.

Free Download
Free Download

FAQ

  • Can I open the shortcut files on my USB to get the original files back?
    No. On an infected USB, a shortcut can point to a script or program rather than the original folder. Do not open unfamiliar .lnk or .exe files. Scan the computer and USB, then check for the original hidden folder instead.
  • Why does my pendrive show shortcuts even though storage space is still used?
    Some malware hides folders while leaving their data on the drive, but used space does not prove the originals are intact. Check hidden items and inspect known folder names before deciding whether data recovery is needed.
  • What if attrib says the folder cannot be found or access is denied?
    Check the USB letter in This PC and the exact folder name before doing anything else. If the original folder is absent, changing attributes will not recreate it. Stop repeating commands and consider a recovery scan only if the USB is stable and readable.
  • Will formatting the USB remove the shortcut virus without losing my data?
    Formatting can remove files and file-system information. Do not format a USB that still holds important, unprotected data. Back up or recover what you can, clean the computer and USB with appropriate security tools, and only then consider reusing or formatting the device.
  • Can Recoverit remove a USB shortcut virus?
    No. Recoverit is a data-recovery application, not an antivirus scanner. Use Windows Security or another trusted security product to handle malware. Recoverit may help search for lost files if the original USB is still detectable and the data has not been overwritten.
  • Can I use these instructions on a Mac?
    The File Explorer and Command Prompt steps here are for Windows 11 and Windows 10. If you use macOS, do not run Windows commands. Use compatible macOS security checks and file-visibility tools, and consider the Recoverit for Mac workflow only when files have actually been lost from a readable drive.
Share article:
Get Recoverit Get Recoverit