How to Enable Long File Paths in Windows Registry
By default, the Windows operating system enforces a legacy
260-character limit on file paths, known as MAX_PATH. This
article outlines the specific Windows Registry key and DWORD value used
to remove this limitation system-wide, allowing compatible applications
and processes to create and read file paths up to 32,767 characters.
The Registry Setting for MAX_PATH Override
To enable long file paths system-wide, modify the
LongPathsEnabled value located within the
FileSystem registry key.
- Registry Key Path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem - Value Name:
LongPathsEnabled - Value Type:
REG_DWORD(32-bit Value) - Value Data:
1= Long file paths enabled (bypassesMAX_PATH)0= Long file paths disabled (standard 260-character limit enforced)
Step-by-Step Configuration Using Regedit
Press
Win + R, typeregedit, and press Enter to open the Registry Editor.Navigate to the following location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystemLocate the value named
LongPathsEnabledin the right-hand pane.
(If it does not exist, right-click an empty area, select New > DWORD (32-bit) Value, and name itLongPathsEnabled.)Double-click
LongPathsEnabled, change the Value data field from0to1, and ensure the Base is set to Hexadecimal or Decimal.Click OK.
Restart your computer or sign out and back in for the changes to take full effect across all system processes.
Enabling Long Paths via PowerShell (Administrator)
Alternatively, you can apply this registry setting directly using an elevated PowerShell prompt:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1Important Considerations
- OS Requirements: This feature is natively supported in Windows 10 (Version 1607 and later), Windows 11, and Windows Server 2016 and later.
- Application Support: Enabling this registry setting
permits long paths system-wide, but individual Win32 applications must
still include a long-path-aware manifest entry
(
longPathAware) to access extended paths without using the\\?\prefix.