Home » How To » How to List All Hidden Files and Folders in Windows

How to List All Hidden Files and Folders in Windows

On Windows, hiding files and folders is as easy as selecting the “Hidden” checkbox in the properties window. In the same way, you can easily unhide hidden files and folders with just a couple of clicks. But what if you forget where a hidden file or folder is located? Or what if you need a complete list of all hidden items on your system? Instead of manually checking each folder and drive, you can use a quick command to list all hidden files and folders in Windows. Better yet, you can save this list to a text file so that you don’t forget them again.

In this quick and simple tutorial, I will show you the steps to list all the hidden files and folders in Windows and save them to a text file. Let’s get started.

List Hidden Files and Folders in Windows

To list all the hidden files and folders, follow the below steps.

  1. Press the Windows key on your keyboard.
  2. Search and open “Command Prompt“.
  3. Type “DriveLetter:” and press “Enter“. Replace “DriveLetter” with the drive letter where you want to find the hidden items.
  4. Run the “dir /S /A:H > hidden.txt” command.
  5. Press the “Enter” button.
  6. Close the Command Prompt window.
  7. Open File Explorer by pressing “Windows key + E“.
  8. Go to the drive you chose earlier.
  9. Open the hidden.txt file to see a list of all hidden files and folders.

Detailed Steps (With Screenshots)

First, open the Command Prompt window. To do that, open the Start menu by pressing the Windows key on your taskbar. Next, search for “Command Prompt“, and click the “Open” option.

Note: On Windows 11, you can open the terminal and then open the Command Prompt tab in it.

After opening the Command Prompt window, navigate to the drive where you want to find all the hidden files and folders using the below command. Replace “DriveLetter” with the actual drive letter. For example, I want to find the hidden files in the D drive. So, I typed “D:” as the command.

DriveLetter:
go to the drive

Once you are in the drive, run the following command.

Note: You can customize the text file name by modifying the “hidden” part of the command.

dir /S /A:H > hidden.txt
command to list all the hidden files and folders

The above action forces the Command Prompt to go through all the files and folders to find the hidden ones. Depending on the number of files and folders, it takes a couple of minutes.

Once done, open the File Explorer and go to the drive you chose earlier. Here, you will find a new file called the “hidden.txt” file. Open it, and you will see a detailed list of all the hidden files and folders in that drive. If you have multiple drives, execute the same command multiple times after changing the drive.

text file with a list of hidden files and folders

That is all. It is that simple to find and create a list of hidden files and folders and export them to a text file.

Wrapping Up — Listing All Hidden Files and Folders

As you can see, with a simple command, you can not only see but save the list of hidden files and folders on Windows. Do keep in mind that the above command also lists all the default system files and folders that are hidden.

If you have any questions or need help, comment below. I’ll be happy to help.

Leave a Comment

Your email address will not be published. Required fields are marked *