Why Windows Says My File Name Is Too Long
Short answer
The limit is on the entire path, not the file name — Windows caps it at 260 characters including the drive letter and every folder in between. Move the parent folder closer to the root, such as C:\temp, and the operation succeeds immediately. On Windows 10 version 1607 and later you can remove the limit entirely with a registry or Group Policy setting.
On this page
Windows refuses to copy, move or delete a file and tells you the name is too
long. You look at the file name. It is Report.docx.
The message is misleading. The limit applies to the complete path — the drive letter, every folder between it and the file, and the file name itself — and Windows caps that at 260 characters. A short file name at the bottom of a deep folder tree breaches it easily.
This is a constraint inherited from the earliest versions of Windows, and although modern Windows can work past it, the setting is off by default and plenty of software still cannot cope.
What counts towards the 260
Everything. Here is a path that fails, at 268 characters:
C:\Users\jennifer\OneDrive - Northfield Partnership LLP\Shared Documents\
Client Work\2026\Q3 Regulatory Review\Working Papers\Draft Submissions\
Reviewed by Compliance\Final Versions\Appendix C Supporting Evidence\
Scan 2026-09-04 14-22-07.pdf
Nothing in it is unreasonable in isolation. The organisation name costs 38 characters before any work begins, the user profile path costs another 17, and eight nested folders with descriptive names do the rest.
Breaking down a typical path:
| Component | Characters |
|---|---|
C:\Users\username\ |
15–25 |
| OneDrive or SharePoint sync prefix | 30–90 |
| Project and year folders | 20–40 |
| Working subfolders | 50–120 |
| The file name itself | 10–60 |
The sync prefix is why this problem is so much more common now than it was ten years ago.
The quick fixes
In order of how fast they are.
Move the folder higher. Cut the problem folder and paste it into C:\temp
or directly onto the drive root. The path collapses, the operation works, and
you can move it back afterwards if you shorten names in the meantime. This
resolves most cases in under a minute.
Map a network drive to a deep subfolder. Right-click the subfolder, use the sharing options, or run:
subst X: "C:\Users\jennifer\OneDrive - Northfield Partnership LLP\Client Work"
Everything below that folder is now reachable as X:\, which saves 60-odd
characters. Run subst X: /d to remove it when finished.
Rename folders in the middle. Q3 Regulatory Review becoming Q3 saves 18
characters. Working upward from the file, shortening two or three folder names
usually brings a path back under the limit. Beware that renaming a folder that
is syncing will propagate the change to everyone else using it.
Use 7-Zip’s file manager. It addresses long paths directly and will delete or move files that File Explorer cannot touch. Open 7-Zip File Manager, navigate to the folder, and operate from there.
Removing the limit properly
Windows 10 version 1607 and later support paths beyond 260 characters, but the support is opt-in.
Via Group Policy, on Pro and Enterprise
- Press Win+R, run
gpedit.msc. - Navigate to Computer Configuration → Administrative Templates → System → Filesystem.
- Open Enable Win32 long paths and set it to Enabled.
- Restart.
Via the registry, on any edition
Registry edits can damage a Windows installation if you change the wrong value. Change only the value named below, and nothing else in that key.
- Press Win+R, run
regedit, and accept the prompt. - Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
- Find
LongPathsEnabled. If it is not there, right-click → New → DWORD (32-bit) Value and name it exactly that. - Set its value to
1. - Restart the computer.
What this does and does not do
File Explorer, PowerShell and modern applications will then handle long paths. Older programs that were compiled without declaring long-path support will not, and will produce the same error as before. The setting does not change their behaviour because the limitation is inside them.
So this fixes the problem for Windows itself whilst leaving some of your software exactly where it was. It is still worth enabling, but it is not the universal fix it sounds like.
Deleting a file you cannot delete
The particularly annoying case: the file exists, Explorer will not remove it, and you cannot shorten the path because renaming the folder also fails.
Robocopy handles it. Create an empty folder, then mirror it over the problem folder:
mkdir C:\emptyfolder
robocopy C:\emptyfolder "C:\path\to\problem\folder" /MIR
This deletes everything inside the target folder. /MIR makes the
destination match the source exactly, and the source is empty. Check the target
path twice before pressing Enter, and never point it at anything you have not
confirmed you want emptied.
Remove the now-empty folder normally afterwards.
Avoiding it in the first place
The structural fix is shorter paths, which mostly means fewer levels of folders rather than cryptic names.
- Keep the tree shallow. Four or five levels is enough for almost anything. Deeply nested structures are also harder to navigate, which is the real cost.
- Use dates in file names, not folders.
2026-09-04 Client Review.docxin one folder beats2026\September\04\Client Review.docxacross four. - Watch what SharePoint sync does. Sync the specific library you need rather than the whole site. Every unnecessary level in the sync root is charged against every file below it.
- Avoid letting software name things. Scanner output, camera exports and
export tools generate names like
Scan_2026-09-04_14-22-07_Document_Page_001.pdfwhich is 48 characters doing the work of about 15.
If you are tidying up a OneDrive folder for this reason, it is worth knowing that OneDrive filling up your C drive is a related and separate problem with its own causes.
What to expect
Moving the folder to C:\temp resolves this immediately in nearly every case,
and is the right first move when you are mid-task and need the file now. The
registry or Group Policy change is the right permanent fix on a machine where
this keeps happening.
The limitation you cannot work around is third-party software. A program that does not support long paths will keep failing regardless of the Windows setting, and that includes some backup tools, some older Office versions, and a surprising amount of line-of-business software. For those, the only answer is shorter paths — which is why the structural advice above matters more than the registry key.