Auto Expand Folders in Windows Explorer via Registry
Windows File Explorer includes a feature that automatically expands the navigation pane tree to highlight and display the currently active folder. While this setting can be toggled through the standard File Explorer options interface, it is directly controlled in the Windows Registry by a specific DWORD entry within the current user’s configuration profile. Adjusting this registry value enables administrators and power users to automate, script, or enforce navigation pane expansion behavior across Windows systems.
The Registry Value Details
To configure the “Expand to open folder” feature, navigate to the following registry path in Regedit:
- Registry Path:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced - Value Name:
NavPaneExpandToCurrentFolder - Value Type:
REG_DWORD(DWORD 32-bit Value)
Value Data Options
1= Enabled (File Explorer automatically expands subfolders in the navigation pane to show the open folder).0= Disabled (The navigation pane remains collapsed and does not track the current folder automatically).
How to Modify the Entry Using Regedit
Press
Windows Key + R, typeregedit, and press Enter to open the Registry Editor.Navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AdvancedLocate the
NavPaneExpandToCurrentFoldervalue in the right pane. If it does not exist, right-click an empty area, select New > DWORD (32-bit) Value, and name itNavPaneExpandToCurrentFolder.Double-click the entry and set the Value data to either
1(to enable auto-expansion) or0(to disable auto-expansion).Click OK to save the changes.
Applying the Changes
For the registry modification to take effect immediately, restart the Windows Explorer process:
- Press
Ctrl + Shift + Escto open Task Manager. - Locate Windows Explorer under the Processes tab.
- Right-click it and select Restart.
Alternatively, logging out and logging back into the Windows account will apply the new configuration.