File Path Too Long in Windows 11? Enable Long Paths and Use These Workarounds
You try to copy, rename, extract, move or delete a file in Windows 11.
Instead, Windows gives you:
The file name would be too long for the destination folder
or:
The specified path, file name, or both are too long
or:
Error 0x80010135: Path too long
The file name itself may not look particularly unusual.
The real problem is usually the complete path.
For example:
C:\Users\Carl\OneDrive - Company Name\Documents\Customers\North Region\Current Projects\Office Refurbishment\Technical Documentation\Final Approved Versions\Network Infrastructure\Switch Configuration\Configuration Backup.txt
Every:
drive letter
slash
folder name
space
file name
extension
contributes to the total.
Windows 11 can support paths far beyond the traditional 260-character limit—but that does not mean every Windows application can use them.
That distinction is the key to fixing the problem properly.
Why Does Windows Still Have a 260-Character Problem?
Traditional Win32 applications were written around a limit called:
MAX_PATH
which is defined as 260 characters.
Modern Windows can support much longer paths. Microsoft says many Unicode Win32 file functions can support extended paths up to roughly 32,767 characters.
But there is an important catch.
For normal modern Win32 long-path behaviour, Microsoft requires two conditions:
1. Windows long paths must be enabled.
2. The application itself must declare that it supports them using longPathAware.
So:
Windows supports long paths
does not mean:
every application supports long paths.
The Most Important 2026 Limitation
Microsoft’s current path-length guidance explicitly says that File Explorer and Office desktop applications do not currently opt in to the long-path behaviour, meaning enabling the Windows policy by itself does not remove the traditional limitation for most normal File Explorer/Office workflows.
This explains a lot of apparently contradictory behaviour.
You may find:
Robocopy can copy the file.
PowerShell can access it.
File Explorer cannot rename it.
Word refuses to open it.
OneDrive reports a sync error.
The file is not necessarily corrupt.
Different applications simply have different path-length capabilities.
First Fix: Shorten the Path
Before changing Windows configuration, try the simplest solution.
Move the affected folder closer to the drive root.
For example, change:
C:\Users\Carl\Downloads\Customer Files\Project Archives\2026\Final Documentation\...
to:
C:\Temp\...
That can remove dozens of characters instantly.
If the problem involves a ZIP archive:
1. Move the ZIP to C:\Temp.
2. Rename it to something short.
3. Extract to:
C:\Temp\Extracted
Then reorganise the resulting files.
This is often the quickest fix for:
Error 0x80010135: Path too long
Shorten Folder Names Near the Top
A change high in the directory tree shortens every path below it.
For example:
Final Approved Technical Documentation
could become:
Final Docs
and:
Customer Correspondence and Approval Records
could become:
Approvals
Do not abbreviate everything into meaningless three-letter codes.
The aim is:
shorter and clearer
not:
shorter and impossible to understand.
Enable Win32 Long Paths With Group Policy
On suitable Windows editions:
Press:
Windows + R
Enter:
gpedit.msc
Navigate to:
Computer Configuration > Administrative Templates > System > Filesystem
Open:
Enable Win32 long paths
Set it to:
Enabled
Then restart Windows.
Microsoft documents this exact policy location.
But remember:
This only helps applications that also support long paths.
If File Explorer or an older line-of-business application still fails afterwards, that does not necessarily mean the policy failed.
Enable Long Paths Through the Registry
For systems without Local Group Policy Editor, the equivalent setting is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Create or edit:
LongPathsEnabled
as:
REG_DWORD = 1
Microsoft also provides this PowerShell command:
New-ItemProperty `
-Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" `
-Value 1 `
-PropertyType DWORD `
-Force
A restart may be required because Windows caches this setting for running processes.
Why Long Paths Still Might Not Work
Suppose you:
enable Group Policy
reboot
try again
and File Explorer still refuses the operation.
That can be completely expected.
The application must also be long-path aware.
Microsoft’s required application manifest includes:
<longPathAware>true</longPathAware>
Without that, an older or incompatible program may continue enforcing MAX_PATH.
So do not keep changing Registry values if the real limitation belongs to the application.
Use Robocopy When File Explorer Fails
Robocopy is often much better for recovering or moving deeply nested directory structures.
For example:
robocopy "C:\Very Long Source Folder" "C:\Recovered" /E /R:1 /W:1
Where:
/E
Copies all subdirectories, including empty ones.
/R:1
Retries failures once.
/W:1
Waits one second between retries.
Microsoft’s current Robocopy documentation applies to Windows 11 and notably includes:
/256
as the option that turns off support for paths longer than 256 characters—meaning Robocopy normally supports longer paths.
That makes Robocopy one of the better built-in tools for long-path recovery.
Be Very Careful With /MIR
You will see guides recommending:
/MIR
Do not use it casually.
/MIR mirrors the source and destination.
That means it can delete files from the destination when they do not exist in the source.
For recovering long-path data, I would usually prefer:
/E
unless you specifically require mirror semantics and understand the consequences.
Copy Before You Move
If the data is important, copy it first.
For example:
robocopy "C:\Problem Data" "C:\Recovered" /E /R:1 /W:1
Verify the destination.
Only then consider removing the original data.
Using:
/MOVE
during the first recovery attempt increases the consequences if something goes wrong.
Use subst to Create a Shorter Route
Windows includes another useful trick.
Suppose the problem folder is:
C:\Users\Carl\Documents\Customers\Current Projects\Technical Documentation
Create a temporary drive letter:
subst X: "C:\Users\Carl\Documents\Customers\Current Projects\Technical Documentation"
You can now refer to it as:
X:\
This removes much of the preceding path from what some applications see.
To remove it later:
subst X: /D
This is a workaround, not a replacement for sensible folder design.
Network Shares Can Benefit From Shorter Mappings
Instead of using:
\\fileserver\Company Shared Data\Customers\Current Projects\Technical Documentation
an administrator might map a deeper location directly to:
P:\
This can shorten paths significantly for applications using the mapped drive.
But do not redesign shared-drive mappings casually.
Existing:
applications
shortcuts
login scripts
backup jobs
may depend on the original location.
OneDrive and SharePoint Have Separate Limits
This is where the article needs the biggest 2026 update.
Microsoft currently documents:
OneDrive and SharePoint cloud path
Maximum:
400 characters
for the complete decoded cloud path including the filename.
OneDrive sync
Maximum total path:
520 characters
comprising the synced path plus the local OneDrive root.
For example, Windows may already use:
C:\Users\Carl\OneDrive - Company Name\
before your project folder even begins.
That means a long organisation name consumes part of the usable local path.
Office Desktop Apps Can Fail Before OneDrive Does
Another current Microsoft detail is particularly important.
Microsoft says Office desktop Win32 applications still commonly operate around the traditional desktop path limitations.
So you can have a document that:
exists successfully in SharePoint
and:
works in Office for the web
but:
fails when opened from synced File Explorer in desktop Word.
That is why:
SharePoint supports 400 characters
does not mean:
every desktop workflow safely supports 400 characters.
Office Creates Temporary Files Too
This can create a particularly confusing issue.
Office applications may create temporary lock files such as:
~$Budget_Report_v3.xlsx
Microsoft notes that these derived temporary paths can exceed application limits even when the original document path is only just below them.
So running permanently at:
259 characters
is not a good information-management strategy.
Build in headroom.
Use PowerShell to Check Path Length
For one path:
("C:\Users\Carl\OneDrive - Company\Projects\File.xlsx").Length
Microsoft also currently provides a PowerShell approach for locating paths over 260 characters.
For example:
Get-ChildItem `
-Path "C:\Users\Carl\OneDrive - Company" `
-Recurse |
Where-Object {
$_.FullName.Length -gt 260
} |
Select-Object `
FullName,
@{Name="PathLength";Expression={$_.FullName.Length}}
This can be extremely useful before:
SharePoint migration
server migration
OneDrive rollout
folder restructuring
because it identifies problematic paths before users discover them individually.
The \\?\ Extended Path Prefix
Windows also supports an extended path form such as:
\\?\C:\Very Long Folder Structure\File.txt
For UNC paths:
\\?\UNC\server\share\folder\file.txt
Microsoft documents the extended namespace as a way compatible Win32 APIs can address very long paths.
But this is primarily useful for:
developers
scripting
specialist tools
It is not something ordinary users should expect to paste into every File Explorer dialog.
And it still will not fix an application whose own code does not support long paths.
Deleting a File With a Path That Is Too Long
The safest first approach is still:
shorten the parent path.
Move or rename a folder higher in the structure.
Then retry deletion.
If the structure remains inaccessible, use Robocopy or a suitable command-line tool rather than repeatedly forcing File Explorer.
When using PowerShell:
Remove-Item `
-LiteralPath "C:\Temp\Problem Folder" `
-Recurse
check the path carefully first.
Recursive command-line deletion may not provide the same Recycle Bin safety that File Explorer users expect.
ZIP Archives Are a Common Source of Long Paths
A ZIP file can contain deeply nested content created on:
another Windows PC
Linux
macOS
a development environment
The archive itself might be easy to download.
Extraction creates the excessive path.
Use:
C:\Temp
for both:
archive
extraction destination
then simplify the folder structure before moving the files to their final location.
Do not extract a deeply nested archive directly into:
OneDrive\Customers\2026\Projects\...
and then blame Windows when the resulting structure breaks.
Long Paths Are Often an Information-Management Problem
If employees regularly encounter long-path errors, the issue may not really be Windows.
Look at the folder structure.
Common causes include:
excessive folder depth
customer name repeated several times
year/project name repeated in every folder
unnecessarily long library names
old server structures copied directly into SharePoint
dates and version numbers repeated in both folders and filenames
For example:
Customers
\Contoso Ltd
\Contoso Ltd Projects
\Contoso Ltd Office Project
\Contoso Ltd Final Documents
\Contoso Ltd Final Approved Network Document.docx
The word:
Contoso
does not need to appear at every level.
Use Metadata Instead of Endless Folders Where Appropriate
SharePoint in particular provides another option.
Instead of encoding every property into folder names:
Customer
\Year
\Department
\Document Type
\Status
some of that information can be represented through:
metadata
columns
views
That can reduce:
folder depth
duplication
path length
while improving searching and filtering.
This is not appropriate for every workload, but it is worth considering when redesigning a large SharePoint structure.
The Best Troubleshooting Order
When Windows reports Path Too Long:
1. Back up important data.
2. Move the affected top-level folder closer to the drive root.
3. Shorten high-level folder names.
4. For ZIP files, extract from C:\Temp.
5. Enable Win32 long paths if appropriate.
6. Restart Windows.
7. Remember that File Explorer/Office may still enforce shorter limits.
8. Use Robocopy when File Explorer cannot copy the data.
9. Use subst as a temporary shortcut.
10. Check OneDrive/SharePoint’s separate 400/520-character limits.
11. Scan for excessive path lengths before migrations.
12. Redesign the folder structure if the problem keeps returning.
The key principle is:
Enable long-path support where useful—but do not build your business filing system around the absolute maximum Windows can theoretically tolerate.
How Hamilton Group Can Help
Long-path problems can cause much more than an annoying File Explorer error.
They can interfere with:
OneDrive synchronisation
SharePoint migrations
Microsoft Teams files
backups
server migrations
document management
line-of-business applications
Hamilton Group can help businesses:
recover files trapped in long directory structures
configure Windows 11 long-path support
identify applications still using legacy limits
restructure shared folders
review OneDrive and SharePoint libraries
scan file servers before migration
reduce future path-length failures
The best fix is usually not simply:
“turn long paths on.”
It is:
enable appropriate Windows support, use compatible tools and keep the information structure comfortably below the limits of the applications employees actually use.
Visit hgmssp.com or call 0330 043 0069.
SEO Meta Description
SEO Keywords
Drupal-ready blog summary
I would replace the current article with this version. The major update is making Microsoft's present limitations much clearer: the Windows long-path policy only helps long-path-aware applications, while File Explorer and Office desktop apps still do not simply become unlimited when you enable it. The article should also now distinguish SharePoint/OneDrive's 400-character cloud limit from the OneDrive sync client's 520-character combined local limit.