Drive Restorer
Windows 10 & 11 Buy license · $29.95
Troubleshooting

USB Drive Shows Empty but the Space Is Still Used: How to Fix It

USB drive shows empty but has data on it? Show hidden files, reset attributes with the attrib command, check for malware and recover files if needed.

Updated 4 minute read The Drive Restorer team

If a USB drive shows empty but its Properties still show space used, your files are almost always hidden rather than gone. Turn on hidden items in File Explorer, then run attrib -h -r -s /s /d E:\*.* in Command Prompt (replacing E: with your drive letter) to clear the hidden and system attributes, and scan the drive for malware. If the used space is zero, the files were deleted or the file system is damaged, and you need a recovery scan before you format.

The first check takes ten seconds and tells you which situation you are in.

First: check the used space

  1. Open File Explorer and click This PC.
  2. Right-click the USB drive and choose Properties.
  3. Look at Used space on the General tab.
What you seeMost likely causeWhat to do
Folder looks empty, but used space roughly matches your filesFiles hidden, often by malwareShow hidden files, use attrib
Only one shortcut file, with the drive's name, and space usedShortcut malware moved files into a hidden folderClean the PC, then use attrib
Used space near zeroFiles deleted, or drive quick-formattedRecovery scan
0 bytes used and 0 bytes free, or "needs to be formatted"File system damaged (RAW)Recovery scan, do not format

Fix 1: Show hidden files in File Explorer

Windows 11: click View → Show → Hidden items.

Windows 10: click the View tab and tick Hidden items.

Malware usually sets the system attribute as well, and Windows hides protected system files even when hidden items are on. To show those too:

  1. Open File Explorer Options (Windows 11: View → Options under the three-dot menu; Windows 10: View → Options).
  2. On the View tab, untick Hide protected operating system files (Recommended) and confirm.
  3. Look at the USB drive again. Hidden files and folders appear with faded icons.

If your files appear, copy them to your PC straight away. Then turn the protected files setting back on afterwards.

Fix 2: Remove the hidden attributes with attrib

Seeing faded files is not a permanent fix. To clear the attributes from everything on the drive:

  1. Note the USB drive's letter in This PC, for example E:.
  2. Click Start, type cmd, and open Command Prompt.
  3. Type attrib -h -r -s /s /d E:\*.* and press Enter.
  4. Wait for it to finish. On a drive with many files it can take a few minutes and prints nothing while it works.
  5. Open the drive in File Explorer. Your files should be visible normally.

What the parts mean: -h removes hidden, -r removes read-only, -s removes system, /s includes all subfolders and /d includes folders as well as files.

Double-check the drive letter before pressing Enter. Running attrib on the wrong drive, especially C:, unhides Windows system files and clutters your view, although it does not delete anything.

Shortcut malware: clean up before you plug it in again

A classic sign of USB malware is a drive that shows a single shortcut with the drive's name, or shortcuts for every folder, while the real files sit in a hidden folder that may have no visible name. Clicking those shortcuts runs the malware, so do not.

  1. Run a full scan with Windows Security: Virus and threat protection → Scan options → Full scan. Also scan the USB drive itself by right-clicking it and choosing Scan with Microsoft Defender (on Windows 11 under Show more options).
  2. Delete the .lnk shortcut files on the USB drive, and any unfamiliar .vbs, .js or .exe files in its root.
  3. Run the attrib command above to reveal the real files.
  4. If a folder has a blank name, open it from File Explorer and copy its contents to your PC.
  5. Scan any other PC the drive has been plugged into recently.

For more on malware that hides or deletes files, see how to recover files deleted by a virus.

When the files are really gone

If the used space is near zero, the files were deleted, the drive was quick-formatted, or malware removed them rather than hiding them. If Windows says the drive needs to be formatted, the file system is damaged. Either way, the data is usually still on the flash memory until something overwrites it.

  1. Do not copy anything new to the drive, and click Cancel on any format prompt.
  2. Scan it with recovery software. In Drive Restorer, select the USB drive and run a quick scan for recently deleted files with their names, then a deep scan to find files by their content if the file system is damaged.
  3. Filter by type or name, preview the files and check the recovery chance rating.
  4. Restore to your PC or another drive, never back to the USB stick.

USB flash drives have no Recycle Bin and usually do not clear deleted data the way an SSD does with TRIM, so recovery chances are often good. Our full guide to recovering deleted files from a USB flash drive covers the details, and if the drive is behaving oddly, see recovering files from a corrupted USB drive.

Other reasons a USB drive looks empty

  • You are looking at the wrong partition. Some drives have a small visible partition and a larger one without a drive letter. Check Disk Management.
  • The drive was encrypted with BitLocker To Go or a maker's tool and needs to be unlocked first.
  • The files are on a different device's format. A drive formatted on a Mac with APFS or HFS+ can appear empty or unreadable on Windows.
  • A counterfeit drive reports more capacity than it has. Files written past the real size were never stored, and the drive may show folders with no contents.

Once your files are safe

Copy everything off and check it opens. Then, if the drive was infected, format it: right-click it in This PC, choose Format, pick exFAT or FAT32 and start. Keep Windows Security turned on, and avoid plugging your drives into shared or public PCs where possible.

Frequently asked questions

Why are my files hidden on a USB drive?

Usually a virus or shortcut malware has set the hidden and system attributes, or the files were moved into a hidden folder. Sometimes the file system is damaged.

What does the attrib command do?

attrib -h -r -s /s /d E:\*.* removes the hidden, read-only and system attributes from every file and folder on drive E: so they show in File Explorer again.

Is it safe to format the USB drive to fix it?

Not until your files are copied off. Unhide or recover them first, scan the drive for malware, then format it.

Get three guides like this every month, plus software update notices.Subscribe →