Windows 11’s File Explorer has made file management easy with its Automatic Folder Type Discovery feature, which automatically adjusts the layout of a drive, folder, or library based on its contents.
It scans a folder’s contents to determine which of its five default templates is the most appropriate: Documents, Pictures, Music, Videos, or General items.
However, if you’re particular about how your files are organized, there are tools you can use to customize these templates to your preferences.
This guide explores how users can change a folder’s template in Windows 11.
Customizing folder templates in Windows 11: A step-by-step guide
📌 Prerequisites:
- Administrator Privileges: You need administrator rights to make system-level changes.
 - Operating System: The methods included in this guide only work on Windows 11 systems.
 - Familiarity with Registry Editor and PowerShell: Experience with using the Registry Editor and PowerShell is required.
 
📌 Recommended deployment strategies:
Click to Choose a Method  | 💻 Best for Individual Users  | 💻💻💻 Best for Enterprises  | 
| Method 1: Change Template via File Explorer | ✓ | |
| Method 2: Customize Folder Template via Registry Editor | ✓ | |
| Method 3: Set Folder Template using PowerShell | ✓ | |
| Method 4: Change Library Template via File Explorer | ✓ | 
Method 1: Change Template via File Explorer
📌 Use Case: This method is best for personal customizations or making quick, one-off changes to a folder’s layout.
Steps:
- Open File Explorer by pressing Win + E.
 - Navigate to the drive or folder you want to modify.
 - Right-click the drive or folder and select Properties.
 - In the Customize tab, navigate to Optimize this folder for and choose your desired template:
- General items
 - Documents
 - Pictures
 - Music
 - Videos
 
 - If you want to apply the template to every subfolder within your chosen directory, check the Also apply this template to all subfolders option.
 - Click OK to apply the changes.
 

💡 Note: Toggling Also apply this template to all subfolders may not work in some Windows 11 builds.
Method 2: Customize Folder Template via Registry Editor
📌 Use Case: This method is recommended for enforcing the same folder layout across multiple devices or user profiles.
- Press Win + R, type regedit, and press Enter to open the Registry Editor.
 - Navigate to: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags
 - Each subkey under Bags corresponds to a folder’s view settings.
 - To identify the right subkey:
- Navigate to HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU.
 - This key maps folder paths to Bag IDs.
 
 - Once you’ve identified the right Bag ID, go back to the corresponding subkey under Bags.
 - Within this subkey, locate or create the FolderType string value.
 - Set the FolderType value to one of the following:
- NotSpecified
 - Documents
 - Pictures
 - Music
 - Videos
 
 - Close the Registry Editor.
 - Restart your computer to apply the changes.
 
⚠️ Warning: Modifying the registry can have unintended consequences. Proceed with caution and make sure to back up the registry before making configurations.
Method 3: Set Folder Template using PowerShell
📌 Use Case: This method automates folder template changes in managed environments.
💡 Note: PowerShell does not provide a direct method for modifying folder templates without user interaction.
- Open PowerShell as administrator.
 - To set a folder’s template, use the following script:
 
$folderPath = “C:\Path\To\Your\Folder”
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace($folderPath)
$folder.Self.InvokeVerb(“Properties”)
⚠️Important: This script will launch the folder’s properties window, but you must adjust the template manually via the GUI.
Method 4: Change Library Template via File Explorer
📌 Use Case: Use this method if you want to optimize the layout of your libraries.
- Press Win + E to open File Explorer.
 - Navigate to Libraries
- If Libraries are not visible:
- Click on the View tab.
 - Select Show > Navigation pane > Show libraries.
 
 
 - If Libraries are not visible:
 - Right-click the library you want to modify and select Properties.
 - Under Optimize this library for, choose your desired template.
 - Click OK to apply the changes.
 
💡 Note: In Windows 11 version 22H2 and later, Microsoft has replaced the classic File Explorer ribbon toolbar with a modern command bar. As a result, the Libraries section is now hidden by default. To restore it in the Navigation pane, right-click on any empty space within the pane and select Show libraries from the context menu.
Verifying your changes
To check if you’ve successfully changed your folder or library template:
- Open the folder or library in File Explorer.
 - Check if the view reflects your chosen template; for example, thumbnails for Pictures and details for Documents.
 
How to disable the Automatic Folder Type Discovery feature in Windows 11’s File Explorer
The Automatic Folder Type Discovery feature may override any manual changes you make to your folder settings. You need to disable the feature to keep your customizations.
- Navigate to:
- HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell.
 
 - Create or modify the Folder Type string value and set it to NotSpecified.
 
This step prevents Windows from automatically changing your file settings by applying a general template to all folders.
⚠️ Things to look out for
Keep these pitfalls in mind when following our guide.
Risks  | Potential consequences  | Reversal  | 
| Incorrect registry configuration | Adding the wrong keys to the Registry can cause system instability. | Back up your registry before making any changes. | 
| Running Command Prompt or PowerShell without administrator rights. | The commands will fail silently. | Make sure you sign in to your system as an administrator before running Command Prompt or PowerShell. | 
| “Also apply this template to all subfolders” option does not work. | Inconsistent folder views. | Manually apply the desired template to each subfolder. | 
Resolving common folder and library template errors
If your folder template unexpectedly reverts to its original layout:
- Make sure the Automatic Folder Type Discovery function is disabled.
 - Verify if there are third-party applications overriding the folder settings.
 - Look for any system updates that may affect File Explorer behavior.
 
Enhance your file organization by changing the folder template in Windows 11 File Explorer.
Changing the folder template in Windows 11 File Explorer is one easy way to enhance your system’s file organization. With built-in tools like the File Explorer, Registry Editor, and PowerShell, you can modify your folder or library’s layout to match your preferences.
To ensure you keep your customizations, it is important to disable the Automatic Folder Type Discovery feature. This way, Windows won’t be able to revert your folder’s template based on the format of its contents.
Related topics:
- How to Customize the Details Pane of File Explorer in Windows
 - How to Turn “Expand to Open Folder” On or Off in File Explorer’s Navigation Pane in Windows 11
 - How to Show or Hide the Preview Pane in File Explorer in Windows 11
 - How to Show Hidden Files in Windows 11: A Complete Guide
 - How to Show or Hide the Preview Pane in File Explorer in Windows 11
 - Change the Default Folder When Opening File Explorer in Windows 10
 
 
