How to show hidden files on Microsoft Windows
Tags: windows
Published: 2021-01-23 20:37:39

---
title: How to show hidden files on Microsoft Windows
published: true
description: You'll learn how to show hidden files on Windows using Windows Explorer and the Command line
tags: windows
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ve6gouqhl2mshoa0ie8f.jpg
series: All about Microsoft Windows
---

## __Introduction__

There are certain cases when you need to show hidden files and directories in Microsoft Windows for reasons best known to you. In this article you'll learn how to do that using Windows Explorer and Command line.

## __Via Windows Explorer__

This option is easier compared to the command line option (discussed later). Kindly perform the following steps:

### __Step 1__

Press and hold the following key combinations <kbd>Windows Key</kbd> + <kbd>R</kbd> on your keyboard, this will invoke the Windows _Run_ dialog box.

![Windows "Run" dialog box](https://dev-to-uploads.s3.amazonaws.com/i/7fs8qytgwpapo9b6jobn.png)

### __Step 2__

Type `control folders` in the box

![Windows "Run" dialog box with text "control folders"](https://dev-to-uploads.s3.amazonaws.com/i/wgkrhwpidmxvifbys3k2.png)

### __Step 3__

Hit OK, and it will display the following box:

![Windows "control folders" box](https://dev-to-uploads.s3.amazonaws.com/i/8xd7nc0v29e8ld8e54oi.png)

### __Step 4__

Navigate to the second tab which is the `View` tab.

### __Step 5__

Click on `Show hidden files, folders, and drives` and click the `Apply` button then `OK` button.

![Windows "control folders" View tab](https://dev-to-uploads.s3.amazonaws.com/i/bmn9d2bw8uuhlm0wjpup.png)

### __Step 6__

That's it. When you do this __all__ files and folders on the system will show.

When you intend to hide all the files, click on `Don't show hidden files, folders, and drives` and click the `Apply` button then `OK` button.

## __Via Command line__

You have to be specific here because it's not advisable to show all hidden files on the system via the command line (unless you are hunting for something).

When you show files via the command line, and you want to hide them back you might have to click on each file and folder and set its attributes to hidden, this can be inconvenient, and it could take lots of your time therefore, __it's best to navigate to folder or drive that you would like to show files therein__.

Perform the following steps:

1. Navigate to a folder or drive via Windows Explorer.
2. Press and hold down the <kbd>Shift</kbd> key, and Right-click on an empty space. The context menu will pop up, among its options is `Open command window here`. Click on it, this will open the command prompt.
3. Type the following: `attrib -h -s -a /s /d *.*`. It might take a while for it to complete depending on the number of files hidden in the folder. When it's done, the cursor will move to receive another set of commands.

### __Explanation of the command__

The `attrib` command is used to manipulate the attributes of files and folders on a Windows system, the remaining part of the command are called _flags_, these flags are explained in the table below:

| Flag  | Explanation                                  |
| ----- | -------------------------------------------- |
| `-h`  | Hidden files                                 |
| `-s`  | System files                                 |
| `-a`  | If it's an archive                           |
| `/s`  | Search the path name including all subfolders |
| `/d`  | Process folders as well                      |
| `*.*` | All files irrespective of their extension    |

### __Advantages of the command line option__

The command line option is quite useful if you have a USB drive that's infected with Malware. When Some malware infects a USB drive, it will hide all the files on the drive. Then you can follow the above detailed steps to show files on the USB drive.

## __Credits__

Cover photo by [Tadas Sar on Unsplash](https://unsplash.com/@stadsa).

## __Updates__

* Added series name on 2<sup>nd</sup> February 2021.