Use this when paths longer than 260 characters fail.
Long Paths
Long paths over 260 characters (MAX_PATH) fail in many Windows apps. Enable LongPathsEnabled by policy or registry for apps that support it, or use the \\?\ prefix and tools like robocopy that handle long paths.
1. Error "path too long" (> 260 characters)?
2. Enable: LongPathsEnabled=1 under HKLM\SYSTEM\CurrentControlSet\Control\FileSystem (or GPO).
3. App must be long-path aware.
4. Use \\?\ prefix or robocopy for legacy tools.
5. Shorten folder structure if possible.
path length → MAX_PATH 260 unless long paths enabled and app aware
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
Value 1 = enabled. Applications must also declare longPathAware in their manifest; Explorer and some older tools still fail at 260 characters. The \\?\C:\very\long\path prefix bypasses the limit for APIs that support it.
Step 2 Common mistakes Narrow the fault
- Long paths enabled in the OS but not supported by the application.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- LongPathsEnabled helps only applications that declare long-path support.
- The \\?\ prefix bypasses MAX_PATH in many APIs.
- robocopy and PowerShell 7 handle long paths.
Get-ChildItem <path> -Force— contents including hiddenTest-Path <path>— exists?Resolve-Path <path>— full pathGet-Item <path> | fl *— attributes and timestamps
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
The classic MAX_PATH limit is 260 characters. Windows 10 1607+ supports long paths for applications that declare longPathAware when the policy is enabled:
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
# or GPO: Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths
Explorer and many older tools still fail on long paths. Workarounds: robocopy (handles long paths), \\?\ prefixes, PowerShell 7, mapping a deeper folder to a drive letter (subst).
ReferenceConfiguration & state1 section · depth on demand
Enabling long paths
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem `
-Name LongPathsEnabled -Value 1 -PropertyType DWORD -Force
Documented example, not captured output (or Group Policy: Enable Win32 long paths). The application must also declare longPathAware in its manifest; PowerShell 7, modern .NET and newer Explorer versions do, many older tools do not. Workarounds: \\?\ prefix, robocopy (handles long paths) or mapping a drive letter deeper in the tree.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Files & Directories → Long Paths. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/storage/file-server/ntfs-overview · confidence 94%