How to fix "This folder is empty" on a USB drive in Windows 10 & 11

When Windows shows "This folder is empty" after you plug in a USB flash drive or external hard drive, the files are usually still there. A hidden-attribute flag makes them invisible. One command in Command Prompt removes the flag and your files reappear.

ADVERTISEMENT
  1. Open File Explorer.
  2. Click This PC in the left panel.
  3. Under Devices and drives, find your USB drive. The letter next to its name (for example, E or F) is what you need.
    USB drive letter
  4. Right-click the Start button (the Windows logo) on the taskbar.
  5. Click Terminal (Admin) (Windows 11) or PowerShell (Admin) or Command Prompt (Admin) (Windows 10).
    Open Windows Terminal as administrator
  6. If a User Account Control window appears, click Yes. If it asks for your administrator password, type it, then click Yes.
  7. Type this command: attrib -h -r -s /s /d f:\*.*. Replace f with your USB drive's letter (for example, E).
    Command Prompt showing the attrib command that fixes the 'This folder is empty' error
  8. Press Enter.
  9. Close the Command Prompt or Terminal window.
  10. Open the USB drive in File Explorer and check that your files are visible.
ADVERTISEMENT

Related:

Fix: The file is too large for the destination file system

Fix: Problem Ejecting USB Mass Storage Device on Windows 10 & 11

USB flash drive shows less space than actual: how to fix it


Windows