File path too long on Windows: 5 fixes that work
Getting a file path too long error on Windows? Why the 260-character limit exists, five ways around it, and how to delete a folder that Explorer refuses.
Written by the team building Quick File Organizer, folders that organize themselves, by your rules.
"The file name is too long", "Destination Path Too Long", "Source path too long" — all three mean the same thing. The file path too long error appears when the full address of a file, from the drive letter to the extension, goes past 260 characters. You can hit it by copying a deeply nested folder, extracting an archive, or syncing a cloud drive.
Here is why the limit exists and five ways to get past it, starting with the quickest.
Why the file path too long error happens
Older Windows programs reserve room for a path of 260 characters: the drive letter, colon, backslash, up to 256 characters of folders and name, and a hidden end marker. The NTFS file system itself allows about 32,000, but any program built around the old limit, including most of File Explorer, stops at 260.
That is why a file path too long message feels random. The file was created by a program that ignores the limit (a browser, a sync client, an archive tool) and is now being touched by one that does not.
Fix 1: shorten a parent folder
The quickest fix is rarely renaming the file itself. Rename a long folder higher up and every path below it shrinks at once:
C:\Users\anna\Documents\Clients and Projects 2026\… (before)
C:\Users\anna\Documents\Clients\… (after)
If Explorer will not rename the deepest items, it will almost always rename a folder near the top, because that folder's own path is short.
Fix 2: move the folder closer to the drive root
A folder on the Desktop already carries C:\Users\yourname\Desktop\ in front
of it. Drag the top-level folder to C:\Temp or D:\, do the copy or
extraction there, and move the result back when the paths are shorter.
Fix 3: map the folder to a drive letter
subst gives any folder its own drive letter, so everything inside it gets a
much shorter address. In Command Prompt:
subst X: "C:\Users\anna\Documents\Clients and Projects 2026\Acme\Deliverables"
Open X: in Explorer, do what you need, then remove the mapping with
subst X: /d. Nothing is copied or moved; X: is just a shortcut.
Fix 4: enable long paths in Windows
Windows 10 (version 1607 and later) and Windows 11 can remove the limit for programs that support it:
Open the Registry Editor
Press Win + R, type
regeditand press Enter.Find the key
Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.Change the value
Double-click
LongPathsEnabled, set it to1, and restart the PC.
On Pro editions the same switch is in Group Policy as "Enable Win32 long paths".
Fix 5: use a tool that ignores the limit
When Explorer refuses to copy or delete, these do not:
- robocopy, built into Windows, supports long paths by default:
robocopy "C:\Source" "D:\Target" /Ecopies a whole tree. - 7-Zip's file manager can browse, rename and delete inside paths that are too long for Explorer.
- PowerShell accepts the
\\?\prefix, which tells Windows to skip the check:Remove-Item -LiteralPath "\\?\C:\very\long\path" -Recurse.
Deleting a folder that will not delete
The classic trick is to mirror an empty folder over it. This deletes
everything inside C:\Stuck, so check the path twice:
mkdir C:\Empty
robocopy C:\Empty "C:\Stuck" /MIR
rmdir C:\Empty "C:\Stuck"
Keeping file paths short
A file path too long error is a symptom of deep nesting: folders inside folders inside a synced directory with a long name. Two habits prevent it. Keep your folder structure to about three levels, and put the detail in the file name instead of in more folders — our file naming convention shows how.
If the nesting comes from files piling up where they land, sort them into a few shallow folders as they arrive rather than building ever-deeper trees.
Common questions
What is the maximum file name length on Windows?
A single file or folder name can be up to 255 characters. The 260 limit applies to the full path, so a long name inside deep folders reaches it much sooner.
Does OneDrive have its own path limit?
Yes. OneDrive limits the full path to 400 characters, counted from the root of the cloud folder, and the local Windows limit still applies on your PC.
Is enabling long paths a safe fix for file path too long errors?
Yes. The setting only changes what modern programs are allowed to do. Older software keeps working exactly as before — it just cannot open the longest paths.