Home > Resources > Windows 8 > Hide or Unhide Files and Folders with Command Prompt

How to Hide or Unhide Files and Folders with Command Prompt

Supposing that you hide the important files and folders in your computer by means of downloaded software, you can think about hiding them by using the built-in Command Prompt. Moreover, after they are hided through cmd, they can be displayed again. And this text will show you how to hide or unhide files and folders with cmd immediately.

Video guide on how to hide or unhide files and folders with CMD:

Hide and unhide folders with Command Prompt:

1. Hide folders

Example: Hide a folder named "Documents" in C disk.

Way 1: Directly use an attrib command to hide the folder.

Step 1: Simultaneously press Windows key and R key to open Run dialog box, input cmd and click OK to open Command Prompt.

Step 2: Input "attrib +s +h c:\documents" (without double quotation marks) in the Command Prompt window and click Enter.

Tips: In this attrib command, "+" stands for setting an attribute, "s" represents system file attribute and "h" means hidden file attribute. Moreover, "c:" is the drive letter and "documents" is the folder name. By analogy, if you want to hide a folder in another hard disk, you can use the attrib command by changing the drive letter and folder name.

For instance, suppose you would like to hide a folder titled "Summary" in E disk, you can input "attrib +s +h e:\summary" (without double quotation marks) in the Command Prompt and press Enter.

Way 2: Enter the disk directory and then use an attrib command to hide the folder.

Example: Hide a folder called "Summary" in E disk.

Step 1: Type e: in the cmd and tap Enter to go to the E disk directory, as shown in the following picture.

Step 2: Input attrib +s +h summary and press Enter.

Tips: Use this attrib command through changing the folder name (referred to "summary") to hide another folder.

2. Unhide Folders.

Accordingly, there are two methods to unhide folders.

Method 1: Directly use an attrib command to unhide the folder (referred to "Documents" folder in C disk).

Input attrib –s –h c:\documents and hit Enter.

Note: In the attrib command, "-" means clearing an attribute.

Method 2: Go to the disk directory in cmd and then use an attrib command to unhide the folder ("Summary" folder in E disk).

Step 1: Enter e: and tap Enter.

Step 2: Input attrib –s –h summary and press Enter.

Hide and unhide files with Command Prompt:

1. Hide files

Example: Hide a txt file named "goals" in E disk.

Enter attrib +s +h e:\goals.txt and tap Enter.


Tips: "goals.txt" refers to the full name of the document (including file extension name). So, you can change the file name and use the attrib command to hide other files.

2. Unhide files.

Input attrib –s –h e:\goals.txt and press Enter to unhide the "goals" document.

Now, you can try the above methods and see if they work well in your computer.

Related Articles:

Hot Categories
Windows 10 Password
Windows 8 Password
Windows 7 Password
More +
Hot Articles
How to Reset Windows 8 Password without Disk
Remove/Bypass Windows 8/8.1 Admin Password
Windows 8.1 Password Reset When Forgot It
Forgot My Laptop Password on Windows 8 | What Do I Do
How to Turn on and Turn off Safe Mode in Windows 8 Computer
More +
Latest Articles
How to Change Startup Password in Windows 8/8.1
Enable and Disable Windows 8 Administrator Account
Prevent Access to Command Prompt on Windows 8/8.1
More +
Hot Products
Windows Password Genius
iTunes Password Genius
Product Key Finder
More +