Set or Unset Hidden Attribute of Files and Folders in Windows 10  

    Set or Unset Hidden Attribute of Files and Folders in Windows 10

    Set or Unset Hidden Attribute of Files and Folders in Windows 10

    How to Set or Unset Hidden Attribute of Files and Folders in Windows 10
    Published by Category: General Tips
    26 Nov 2019
    Designer Media Ltd

    How to Set or Unset Hidden Attribute of Files and Folders in Windows 10


    In Windows, you can set or clear the hidden attribute for files and folders to hide or unhide them.

    Hidden files and folders do not show by default in Windows.

    If you have Windows set to show hidden files, folders, and drives, hidden items will be faded (dimmed) in File Explorer to indicate that they are hidden.

    If you have Windows set to don't show hidden files, folders, or drives, hidden items will not be seen in File Explorer.

    This tutorial will show you different ways on how to set or unset the hidden attribute to hide or unhide files and folders in Windows 10.


    Contents







    OPTION ONE

    To Hide Files and Folders using File Explorer Ribbon


    1 Open File Explorer (Win+E).

    2 Click/tap on the View tab, select one or more unhidden files and/or folders you want to hide, and click/tap on the Hide selected items button in the ribbon. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide_files_folders_ribbon.jpg

    3 If you selected a folder, select (dot) to either Apply changes to this folder only or Apply changes to this folder, subfolders and files for what you want, and click/tap on OK. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-confrim_hide_files_folders.png





    OPTION TWO

    To Unhide Files and Folders using File Explorer Ribbon


    You will need to have Windows set to show hidden files, folders, and drives to be able to see hidden items as faded (dimmed) in File Explorer to make it easy to select them to unhide.


    1 Open File Explorer (Win+E).

    2 Click/tap on the View tab, select one or more hidden files and/or folders you want to unhide, and click/tap on the highlighted Hide selected items button in the ribbon. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-unhide_files_folders_ribbon.jpg

    3 If you selected a folder, select (dot) to either Apply changes to this folder only or Apply changes to this folder, subfolders and files for what you want, and click/tap on OK. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-confirm_unhide_files_folders_ribbon.png





    OPTION THREE

    To Hide Files and Folders from Properties


    1 Open File Explorer (Win+E).

    2 Select one or more unhidden files and/or folders you want to hide, right click or press and hold on the selected items, and click/tap on Properties. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide-unhide_files_folders_properties.jpg

    3 In the General tab, check the Hidden box in the bottom Attributes section, and click/tap on OK. (see screenshots below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide_files_folders_properties.png

    4 If you selected a folder, select (dot) to either Apply changes to this folder only or Apply changes to this folder, subfolders and files for what you want, and click/tap on OK. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-confrim_hide_files_folders.png





    OPTION FOUR

    To Unhide Files and Folders from Properties


    1 Open File Explorer (Win+E).

    2 Select one or more hidden files and/or folders you want to unhide, right click or press and hold on the selected items, and click/tap on Properties. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide-unhide_files_folders_properties.jpg

    3 In the General tab, uncheck the Hidden box in the bottom Attributes section, and click/tap on OK. (see screenshots below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-unhide_files_folders_properties.png

    4 If you selected a folder, select (dot) to either Apply changes to this folder only or Apply changes to this folder, subfolders and files for what you want, and click/tap on OK. (see screenshot below)

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-confirm_unhide_files_folders_ribbon.png





    OPTION FIVE

    To Hide File using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the file.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib +h "full path of file with extension"

    Substitute full path of file with extension in the command above with the actual full path of the unhidden file you want to hide.

    For example: attrib +h "C:\Users\Brink\Desktop\Folder\File1.txt"

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide_file_command.png






    OPTION SIX

    To Unhide File using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the file.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib -s -h "full path of file with extension"

    Substitute full path of file with extension in the command above with the actual full path of the hidden file you want to unhide.

    For example: attrib -s -h "C:\Users\Brink\Desktop\Folder\File1.txt"

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-unhide_file_command.png






    OPTION SEVEN

    To Hide Folder Only using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the folder.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib +h "full path of folder"

    Substitute full path of folder in the command above with the actual full path of the unhidden folder you want to hide.

    For example: attrib +h "C:\Users\Brink\Desktop\Folder"

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide_folder_only_command.png






    OPTION EIGHT

    To Unhide Folder Only using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the folder.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib -s -h "full path of folder"

    Substitute full path of folder in the command above with the actual full path of the hidden folder you want to unhide.

    For example: attrib -s -h "C:\Users\Brink\Desktop\Folder"

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-unhide_folder_only_command.png






    OPTION NINE

    To Hide Folder, Subfolders and Files using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the folder.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib +h "full path of folder\*" /s /d

    Substitute full path of folder in the command above with the actual full path of the unhidden folder you want to hide along with all of its contents.

    For example: attrib +h "C:\Users\Brink\Desktop\Folder\*" /s /d

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-hide_folder_subfolders_and_files_command.png






    OPTION TEN

    To Unhide Folder, Subfolders and Files using Command Prompt


    1 Open a command prompt or elevated command prompt based based on the access permissions you have for the folder.

    2 Type the command below into the command prompt, and press Enter. (see screenshot below)

    attrib -s -h "full path of folder\*" /s /d

    Substitute full path of folder in the command above with the actual full path of the hidden folder you want to unhide along with all of its contents.

    For example: attrib -s -h "C:\Users\Brink\Desktop\Folder\*" /s /d

    Set or Unset Hidden Attribute of Files and Folders in Windows 10-unhide_folder_subfolders_and_files_command.png


    That's it,
    Shawn






  1. Posts : 2
    Windows 10 Home
       #1

    A correction for option 6 command syntax


    On option 6, the only switch you show is the "-h" switch.

    When I used that cmd as shown, I was getting error: "Not resetting system file..."
    (Same thing using administrator mode.)

    Finally, I figured out that I also needed to add the "-s" switch. This seems to be needed
    because my file ALSO had an "S" attribute, in addition to the "H" attribute.

    (I also noticed in cmd-line options further down, you DO add an additional switch out at the end
    of the cmd, of "/S".)

    So, maybe you should say to do that on option 6, too?

    Or else add some clarifying remarks up front on option 6, explaining that files with
    'hidden' attribute also will likely also have 'system' attribute, and that an extra switch
    argument is needed in that case.

    Cheers...
    i
      My Computer


  2. Posts : 69,003
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Hello @SarasotaSlim,

    Thank you for letting me know. I added the "-s" switch to the unhide commands in the tutorial so they will include system files.
      My Computers


  3. Posts : 150
    Windows 10 Pro x64 Insider Preview Build 19045.3269
       #3

    SarasotaSlim said:
    On option 6, the only switch you show is the "-h" switch.

    When I used that cmd as shown, I was getting error: "Not resetting system file..."
    (Same thing using administrator mode.)

    Finally, I figured out that I also needed to add the "-s" switch. This seems to be needed
    because my file ALSO had an "S" attribute, in addition to the "H" attribute.

    (I also noticed in cmd-line options further down, you DO add an additional switch out at the end
    of the cmd, of "/S".)

    So, maybe you should say to do that on option 6, too?

    Or else add some clarifying remarks up front on option 6, explaining that files with
    'hidden' attribute also will likely also have 'system' attribute, and that an extra switch
    argument is needed in that case.

    Cheers...
    i
    Doesn't work on the Windows folder though - lots of access denied errors.
      My Computer


  4. Posts : 69,003
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    thewizardoz said:
    Doesn't work on the Windows folder though - lots of access denied errors.

    Nope. The Windows folder is owned by "Trusted Installer", and restricted to prevent such actions since it contains system files.
      My Computers


  5. Posts : 150
    Windows 10 Pro x64 Insider Preview Build 19045.3269
       #5

    Brink said:
    Nope. The Windows folder is owned by "Trusted Installer", and restricted to prevent such actions since it contains system files.
    OK. Thanks Shawn.
      My Computer


  6. Posts : 16,976
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #6

    I think it would be worth adding an explanation of the nature of the Hidden property for folders - Option 4 Step 3.

    folder read-only indicator [KeithM] - TenForums
    Read Only (Folders) - [Fred Long, LemP] MSA forum
    You cannot view or change the Read-only or the System attributes of folders [Win7 etc] - MSSupport


    All the best,
    Denis
      My Computer


 

Tutorial Categories

Set or Unset Hidden Attribute of Files and Folders in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:08.
Find Us




Windows 10 Forums