By Dervish / Last Updated May 12, 2023

Quick Navigation:

The issue: files not showing in USB

“I had files stored on a flash drive. They were in folders and some were out of folders. The contents of the folders are showing empty; although the size of the properties describes them as containing files of size consistent with their original content.

I have used chkdsk /f and it said that it found problems and fixed them. That did not restore the missing files. Why are things so complicated? I am using Windows 7 but I also have access to a Windows 10 computer. Please help!”

The problem of files not showing in external hard drive happens now and then. It could be caused by hidden files, corrupted file system, virus attack and so on. Then, how to show hidden files in Windows 11/10/8/7? Command Prompt, a built-in tool in Windows, can give you a hand.

How to show hidden files using command lines

Actually, there are two ways to show hidden files using command: dir command and attrib command. You can refer to the following parts to learn how to show hidden files in CMD:

▶ Way 1: view hidden files with dir command

1. Hit Windows Key + X on your keyboard, and select Command Prompt (Admin) from the menu.

2. Type dir F: /a:h /b /s and press Enter to show hidden files in drive F. You should change the drive letter according to your situation.

Dir Command

Tips:
▪ /a:h—displays the names of the directories and files with the Hidden attribute; the colon between “a” and “h” is optional;
▪ /b—displays a bare list of directories and files, with no additional information;
▪ /s—lists every occurrence of the specified file name within the specified directory and all subdirectories.

3. Type exit and press Enter to exit Command Prompt.

You can only view hidden files in the Command Prompt window by using dir command. To unhide those files from specific drive, please learn how to show hidden files via command from Way 2.

▶ Way 2: show hidden files with attrib command

1. Open Command Prompt as you do in Way 1.

2. Type attrib -h -r -s /s /d F:\*.* and press Enter to unhide hidden files in drive F. Replace the drive letter with yours.

Attrib Command

Tips:
▪ -h—clears the Hidden file attribute; -r—clears the Read-only file attribute; -s—clears the System file attribute;
▪ /s—applies attrib and any command-line options to matching files in the current directory and all of its subdirectories;
▪ /d—applies attrib and any command-line options to directories.

3. Type exit and press Enter to exit Command Prompt. You can then see the hidden files in corresponding drive.

Extra tips for fixing hidden files on external hard drives

As mentioned in the first part, corrupted file system can lead to files not showing. If you fail to show hidden files using command line, you can check and fix disk errors with a handy freeware AOMEI Partition Assistant Standard. It supports all Windows PC operating systems like Windows 11/10/8.1/8/7/Vista/XP. Please follow the instructions below to fix a corrupted external hard drive:

Step 1. Connect the external drive to your computer and make sure it is detected. Download, install and launch AOMEI Partition Assistant.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Step 2. Right-click on the partition of the drive, select “Advanced” and then “Check Partition”.

Check Partition

Step 3. You’ll see three check options. Choose the first one and click “OK”.

Check Partition and Fix Errors

Step 4. Wait for the process to be completed. Click “OK” when it’s done. Corrupted file system can be fixed in this way, so you can see hidden files again from File Explorer.

Check and Fix Partition

Verdict

Now you know how to show hidden files using command lines in Windows 11/10/8/7. You can also use AOMEI Partition Assistant to fix corrupted file system, thus retrieving hidden files. Apart from checking and fixing disk errors, AOMEI Partition Assistant allows you to test disk speed and fix unformatted hard drives. Why not give it a try at once?