SharePoint Online: How to Hide Folders in Document Library and Show All Files?

Requirement: Display all files without folders in the SharePoint Online document library.

When you have a complicated deep File-Folder structure, You may want to hide folders from the view and show all files without folders in the SharePoint document library view. Probably, you may wish to use Metadata instead of Folders!

hide folder in sharepoint online document library

How to hide folder in SharePoint Online document library?

How to Hide Folders and Display Files from the Folders in SharePoint Online? Here is how to hide folders from SharePoint Online view and get flat files structure:

  • Create a new view, E.g. “All Files” or edit any existing view
  • Under the view settings, scroll down to “Folders” section >>> Set the option “Show all items without folders”
  • Click on “OK” button to save your changes.
sharepoint online hide folder

This suppresses all folders and gets files from all folders and sub-folders in a flat view. Please note, It’s not possible to hide just one folder in the SharePoint Online document library!

Be cautious when using this setting on bigger lists and libraries! When you show items without folders, You may end up “Listview threshold issue exceeded!” error.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

4 thoughts on “SharePoint Online: How to Hide Folders in Document Library and Show All Files?

  • There is a hack for hiding individual folders in a SharePoint library. Create a custom view for filtering the folders to be hidden. Create a “choices” column in the library and name it “Hide/Unhide”. Enter choices as “hide” and “unhide”. Choose “hide” for the folders to be hidden. Edit the view and filter the list by “Hide/Unhide” column values set to “empty” and it’s done! In the end, hide the “Hide/Unhide” column from the library.

    Reply
  • Thanks for the guide–can you explain how to do the opposite? I want the default view of a library to be only the folders at the top of a folder hierarchy, and to only see the files within folders after clicking in to those folders.

    Thanks!

    Reply
  • Thanks Salaudeen,

    What it does for me: It merely hides empty folders.
    If there are folders with files (or folders) inside, I still see the folders.

    What’s the trick to show _all_ files without _any_ folders?

    Thanks
    Henryk

    Reply
    • That sounds Odd! This setting should hide all folders and display files from all levels. Try creating a new library and set this configuration to make sure if there are some other settings caused the issue you are facing.

      Reply

Leave a Reply

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