Enable Win32 Long Paths in Windows 11
In this article
Yes, you can enable Win32 long paths in Windows 11, allowing file paths longer than 260 characters, which helps avoid errors when working with deeply nested folders or long file names. This feature must be enabled manually through Group Policy or the Windows Registry, as it is disabled by default for compatibility reasons. Before starting, ensure you have administrator access and consider backing up the registry if editing manually.
What You'll Need
- Administrator account on the Windows 11 device
- Access to either Local Group Policy Editor (gpedit.msc) or Registry Editor (regedit)
- Optional: System restore point or registry backup for safety
Step-by-Step
- Press Windows + S, type gpedit.msc, and press Enter to open the Local Group Policy Editor. If you see an error that the app can't be found, your edition of Windows 11 does not include Group Policy (common in Home editions). Skip to the registry method in Step 6.
- In the Group Policy Editor, navigate to Computer Configuration > Administrative Templates > System > Filesystem. Menu labels may vary slightly by system version or language, but the path is consistent in English installations.
- In the right pane, locate and double-click Enable Win32 long paths. This setting controls whether Windows applications can handle paths longer than MAX_PATH (260 characters).
- In the dialog that opens, select Enabled, then click Apply and OK. This changes the system policy to allow long paths for compatible apps.
- Close the Group Policy Editor. No immediate restart is required, but some applications may need to be restarted or installed afterward to recognize the change.
- If Group Policy is not available, press Windows + R, type regedit, and press Enter to open the Registry Editor. Confirm the User Account Control prompt if it appears.
- In Registry Editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem. You can paste this path into the address bar for faster access.
- Find the DWORD value named LongPathsEnabled. If it does not exist, right-click in the right pane, select New > DWORD (32-bit) Value, and name it LongPathsEnabled.
- Double-click LongPathsEnabled and set its value data to 1. Click OK to save.
- Close Registry Editor. The change takes effect immediately for new processes, but a restart ensures full system consistency, especially for system services.
- After enabling, test by creating or accessing a file path longer than 260 characters using File Explorer or a command prompt. Note that not all applications support long paths—only modern Win32 apps and those specifically coded to handle them will work correctly.
Common Mistakes
- Editing the wrong registry key: Ensure you're modifying
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem, not a similarly named key under user profiles or other branches. - Setting LongPathsEnabled to 0: A value of 0 disables the feature. Always set it to 1 to enable.
- Expecting all apps to support long paths: Legacy applications, especially those not updated for modern Windows APIs, may still fail even with the setting enabled.
- Not using administrator privileges: Both Group Policy and Registry Editor require admin rights. Running them without elevation prevents changes from being saved.
- Assuming File Explorer fully supports long paths: While it can display and navigate longer paths when the setting is on, some operations (like copying) may still fail in deeply nested directories.
Tips
- Create a system restore point before editing the registry or Group Policy to allow quick rollback if needed.
- Use command-line tools like
robocopyor PowerShell scripts for moving files in long-path directories—they handle deep nesting better than File Explorer. - Enable this setting in automated deployment environments (e.g., enterprise imaging) to prevent issues in development or data processing workflows.
- Developers should use
\?\prefixed paths in code for maximum compatibility, even when long paths are enabled system-wide. - Check application documentation to confirm long path support—some programs require additional configuration or updates.
Troubleshooting
If long paths still don’t work after enabling the setting:
- Restart the computer: Some system components only read the setting at boot. A restart ensures all services apply the new policy.
- Verify the setting is applied: Reopen Group Policy or Registry Editor and confirm the value is still set to Enabled or 1. Third-party tools or updates rarely reset this, but it’s worth checking.
- Test with PowerShell: Run a command like
New-Item -Path "C:\test\folder1\...\verylongname.txt"with a path over 260 characters. PowerShell supports long paths when the system setting is on. - Check application compatibility: Try using a modern app or script. If it fails, the issue is likely app-specific, not system-wide.
- Ensure the drive is NTFS: Long path support requires NTFS. FAT32 and exFAT do not support the same extended path handling.
- Look for third-party security software: Some antivirus tools intercept file operations and may block long paths regardless of system settings. Temporarily disable to test, then consult vendor documentation.
Frequently Asked Questions
Does enabling long paths affect system stability?
No, enabling Win32 long paths is safe and supported by Microsoft. It only affects applications that explicitly support long paths and does not alter core system behavior.
Why doesn’t File Explorer copy long paths even after enabling the setting?
File Explorer has partial support. Use command-line tools like robocopy or PowerShell for reliable operations with very long paths.
Can I enable long paths on Windows 11 Home?
Yes, but Group Policy isn’t included. Use the Registry Editor method instead to set LongPathsEnabled to 1.
Do I need to change app settings after enabling long paths?
Some apps may require updates or internal settings changes. The system setting allows support, but apps must be designed to use it.
Will this allow paths longer than 32,767 characters?
The theoretical maximum is 32,767 characters with long paths enabled, but practical limits depend on the app and available memory.
Does this work on network shares?
Only if the remote system also supports long paths and the connection uses a protocol that preserves long path information, such as SMB 3.0+.