Hiding files and folders keeps everyday directories readable and helps prevent accidental edits of items that should stay untouched. It is a practical way to reduce noise from build artifacts, tool-generated folders, or rarely-used reference files without deleting anything.

Windows tracks visibility using filesystem attributes, primarily Hidden and (optionally) System, and display tools decide what to show based on those flags. The Properties dialog in File Explorer and the attrib command in Command Prompt both change the same underlying attributes.

Hidden is not access control: anything with permission can still open the item, and enabling hidden-item display makes it visible immediately. UI placement differs slightly between Windows 10 and Windows 11, and hiding a folder can optionally apply the attribute to its subfolders and files.

Steps to hide files and folders using the graphical interface in Windows:

File Explorer applies the Hidden attribute through the item properties dialog and removes the item from normal views when hidden-item display is disabled.

  1. Open File Explorer.
  2. Browse to the file or folder to hide.
  3. Right-click the item and select Properties.
  4. Enable Hidden under Attributes in the General tab.
  5. Click OK to save the change.
  6. Select an option in Confirm Attribute Changes if prompted for folders.

    Choosing Apply changes to this folder, subfolders and files can hide large directory trees and make content appear “missing” in normal views.

  7. Disable hidden-item display in File Explorer.

    Windows 11: ViewShowHidden items should be unchecked.
    Windows 10: View tab → Hidden items checkbox should be cleared.

  8. Verify the item no longer appears in the folder listing.

Steps to hide files and folders using the Command Prompt in Windows:

attrib toggles file attributes directly and is useful for scripting or making bulk changes without opening File Explorer.

  1. Open Command Prompt in the directory that contains the target item.
    C:\>cd /d "C:\Users\Public\Documents"

    Administrative privileges are typically required only when changing items in protected locations such as C:\Windows or C:\Program Files.

  2. Apply the Hidden attribute using attrib.
    C:\Users\Public\Documents>attrib +h "MyFolder"

    Remove the attribute later with attrib -h "MyFolder".

  3. Add the System attribute only when necessary.
    C:\Users\Public\Documents>attrib +h +s "MyFolder"

    Marking an item as System can keep it hidden until “protected operating system files” are shown, and can make it harder to locate later.

  4. Verify the current attributes on the target item.
    C:\Users\Public\Documents>attrib "MyFolder"
    H  C:\Users\Public\Documents\MyFolder

    Common attribute letters include H (Hidden) and S (System).

  5. Confirm the item is absent from a normal listing and visible only when including hidden entries.
    C:\Users\Public\Documents>dir
     Volume in drive C is OS
     Volume Serial Number is 12AB-34CD
    
     Directory of C:\Users\Public\Documents
    
    12/22/2025  09:41 AM    <DIR>          .
    12/22/2025  09:41 AM    <DIR>          ..
    12/18/2025  02:15 PM    <DIR>          Reports
    12/20/2025  11:03 AM                 92 notes.txt
    ##### snipped #####
    
    C:\Users\Public\Documents>dir /a
     Volume in drive C is OS
     Volume Serial Number is 12AB-34CD
    
     Directory of C:\Users\Public\Documents
    
    12/22/2025  09:41 AM    <DIR>          .
    12/22/2025  09:41 AM    <DIR>          ..
    12/22/2025  09:40 AM    <DIR>          MyFolder
    12/18/2025  02:15 PM    <DIR>          Reports
    12/20/2025  11:03 AM                 92 notes.txt
    ##### snipped #####