Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Long Paths

Direct answer

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.

When to use this

Use this when paths longer than 260 characters fail.

First 30 seconds

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.

Operational verification

path length → MAX_PATH 260 unless long paths enabled and app aware

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Microsoft Windows
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformMicrosoft Windows
Scope / prerequisiteUse this when paths longer than 260 characters fail.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • LongPathsEnabled helps only applications that declare long-path support.
  • The \\?\ prefix bypasses MAX_PATH in many APIs.
  • robocopy and PowerShell 7 handle long paths.
Key checks
  • Get-ChildItem <path> -Force — contents including hidden
  • Test-Path <path> — exists?
  • Resolve-Path <path> — full path
  • Get-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).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docMicrosoft Windows current

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%
Confirmation

Confirm action

Continue?