Skip to content
8 min fix 13 min read Recently reviewedBeginner
Quick Answer

Shorten the whole path, not the file name. Rename a folder high up the tree to something shorter, or move the folder to the root of your C: drive and work on it there. Windows counts everything from the drive letter to the file extension against a 260-character limit.

How to Fix "File Path Too Long" Errors on Windows

Applies to: Windows 11, Windows 10; OneDrive for Business, SharePoint, mapped network drives
Article Type: Troubleshooting
Last Updated: 2026-07-29

Summary

Windows refuses to create, copy, or rename a file when its full path passes 260 characters — and the path is measured from the drive letter, not from the file name. This article shows you how to find the length, remove it by renaming or relocating folders, get files moved through a ZIP or Robocopy when File Explorer gives up, and what to send IT if the long path setting genuinely needs turning on.

Symptoms

  • A copy or move stops with a dialog titled Destination Path Too Long reading The file name(s) would be too long for the destination folder.
  • The same dialog appears as Source Path Too Long when the files you are copying from are the deep ones.
  • Saving from Word, Excel, or another app produces The specified path, file name, or both are too long.
  • A file will not rename, delete, or open, and File Explorer gives no explanation beyond a generic error.
  • OneDrive shows a red circle on a folder and the activity centre reads Path too long or File name or path too long.
  • The problem started after files moved into a synced OneDrive or SharePoint folder, and the same files worked fine on the old network drive.

Prerequisites

  • Windows 11 or Windows 10.
  • Permission to rename or move the folders involved. On a shared drive that permission belongs to whoever owns the folder — see How to Fix "You Need Permission to Perform This Action" if renaming is blocked.
  • No admin rights required for Steps 1 to 6. Step 7 is the one that needs IT.

Instructions

1. Confirm the Path Is Too Long, and Find Out Where

Before you move anything, measure what you are dealing with. Knowing you are 30 characters over is a different job from being 150 over.

  1. Open File Explorer and navigate to the folder holding the problem file.
  2. Click once in the address bar at the top of the window. The friendly breadcrumb trail turns into the real path, highlighted and ready to copy — for example C:\Users\jsmith\OneDrive - Contoso\Projects\2026\Northwind Regional Expansion\Deliverables\Phase 2 Final.
  3. Press Ctrl + C to copy it.
  4. Open Notepad from the Start menu and press Ctrl + V. Type a backslash, then the file name and its extension, so the line reads exactly what Windows sees.
  5. Read the character count at the bottom right of the Notepad window. If the status bar is hidden, open the View menu and select Status bar. The Col number at the end of the line is your path length.
  6. Compare it to the limits:
    • 260 characters — the hard ceiling for a full file path. Two characters are reserved internally, so treat 258 as your target.
    • 248 characters — the ceiling for creating a new folder.
    • 400 characters — the separate ceiling that OneDrive and SharePoint apply to the whole path once the file reaches the cloud.
  7. Look at where the length came from. Long descriptive folder names near the top of the tree cost you far more than the file name does, because every file underneath pays for them.

Note: OneDrive and SharePoint allow 400 characters, but the synced copy on your PC still sits inside a Windows folder such as C:\Users\jsmith\OneDrive - Contoso\. That prefix alone is around 40 characters before your own folders start, which is why the 260-character Windows limit is what you hit first — and why this error surfaces on synced folders far more often than on anything else.

2. Shorten a Folder Name High in the Tree

This is the fastest real fix. One rename near the top of the tree removes those characters from thousands of paths at the same time.

  1. In File Explorer, work back up the tree from the problem file and find the longest folder name closest to the top.
  2. Right-click that folder and select Rename, or select it and press F2. The name becomes an editable text box.
  3. Type a shorter version and press Enter. Northwind Regional Expansion Programme becomes Northwind, which recovers 28 characters from every file inside it.
  4. Repeat on one or two more folders until you have removed enough characters. Aim to finish at least 20 characters under the limit so future files have room.
  5. Open the problem file again. It opens, saves, and copies normally.

Tip: Rename folders rather than files wherever you have the choice. A file name change helps one file; a folder name change helps everything beneath it, and it does not break links to individual documents that colleagues have already saved.

Verification: Repeat Step 1 on the renamed tree. The Col count in Notepad is now below 258.

3. Move the Folder Closer to the Drive Root

When the tree above your folder belongs to someone else and renaming is off the table, take the folder out of the tree instead.

  1. Create a short working folder at the top of your drive. Open File Explorer, select This PC in the left sidebar, double-click Local Disk (C:), then right-click empty space and select New > Folder. Name it Temp. The full path is now nine characters.
  2. Go back to the deep folder. Right-click it and select Cut, or select it and press Ctrl + X.
  3. Open C:\Temp and press Ctrl + V. The folder moves across with everything inside it, and every file inside instantly loses the entire old leading path.
  4. Do the work you needed to do — open the file, edit it, rename it, delete what is no longer wanted.
  5. Move the folder back when you are finished, or leave it out if the deep location was the problem in the first place.

Note: If the move itself fails with the same Destination Path Too Long message, File Explorer cannot read the source either. Skip to Step 5 or Step 6 — both reach files that File Explorer has given up on.

4. Shorten the Path You Work Through

You do not always have to move the files. Shortening the route to them works equally well, and none of these options need admin rights.

Map a network drive. A share reached as \\fileserver01\Departments\Finance\Reporting costs 46 characters on every path beneath it. Mapped to a drive letter, it costs three.

  1. In File Explorer, select This PC in the left sidebar.
  2. Click the three dots in the toolbar and select Map network drive. On Windows 10, open the Computer tab on the ribbon and click Map network drive.
  3. Choose a letter in the Drive dropdown, paste the folder path into the Folder box, tick Reconnect at sign-in, and click Finish.
  4. The share appears under This PC as P: or whichever letter you picked, and paths beneath it are measured from there. Full instructions are in How to Map a Network Drive and Access Shared Folders on Windows.

Substitute a drive letter for a local folder. The same trick works on your own hard disk.

  1. Press the Start key, type cmd, and open Command Prompt. A standard window is fine — this needs no admin rights.
  2. Type subst followed by a spare drive letter and the folder path in quotation marks, then press Enter:
    text
    subst X: "C:\Users\jsmith\OneDrive - Contoso\Projects\2026\Northwind Regional Expansion"
  3. Open File Explorer. A new drive X: appears under This PC showing that folder's contents. Everything inside is now two characters from the root, and files that refused to open a minute ago open normally.
  4. Remove it when you are done by typing subst X: /d and pressing Enter. The drive letter disappears. It also disappears on its own when you restart.

Use Add shortcut to My files instead of syncing a deep library. A SharePoint library synced the old way lands inside a long C:\Users\...\Contoso\Team Site - Documents\ path. A shortcut lands at the top of your OneDrive instead.

  1. Open the SharePoint site or Teams Files tab in your browser.
  2. Navigate to the library or folder you use, but do not open it — select it by clicking the circle to the left of its name.
  3. Click Add shortcut to My files in the toolbar above the list.
  4. The folder appears in your OneDrive with a link badge on the icon, one level down instead of five, and every path beneath it shortens by the difference.

5. Zip the Folder to Move It in One Piece

A ZIP archive records each file's path relative to the folder you compressed, so the giant leading path stops travelling with the files.

  1. In File Explorer, go one level above the deep folder — not into it.
  2. Right-click the folder and select Compress to ZIP file. On Windows 10, right-click and select Send to > Compressed (zipped) folder.
  3. A .zip file appears beside the folder with the name selected and ready to edit. Type a short name and press Enter.
  4. Move or email the ZIP file wherever it needs to go. It is a single file, so the destination only has to accommodate its own short name.
  5. Extract it somewhere shallow. Right-click the ZIP, select Extract All, and change the Files will be extracted to this folder box to C:\Temp before clicking Extract. The contents land with a nine-character prefix instead of the original hundred-plus.
  6. For the full options, see How to Compress and Extract ZIP Files in Windows 11.

Note: If compressing fails partway through with a path error, the tree is too deep for the built-in ZIP tool as well. Shorten one folder name first with Step 2, then compress again — removing 20 characters is often enough to get the archive built.

6. Copy Stubborn Folders with Robocopy

Robocopy ships with every copy of Windows, runs as a standard user, and handles paths that File Explorer refuses to open. Use it when a folder will not budge any other way.

  1. Press the Start key, type cmd, and open Command Prompt.
  2. Type the command below on one line, replacing the two paths with your own. Keep the quotation marks — they protect the spaces in folder names.
    text
    robocopy "C:\Users\jsmith\OneDrive - Contoso\Projects\2026\Northwind Regional Expansion" "C:\Temp\Northwind" /E
  3. Press Enter. Robocopy prints a running list of folders as it works, then a summary table counting Dirs, Files, and Bytes copied.
  4. Check the Failed column in that summary. A row of zeros means everything arrived.
  5. Open C:\Temp\Northwind in File Explorer and confirm your files are there before you delete anything from the original location.

Tip: /E copies the folder and every subfolder, including empty ones, and leaves the originals untouched. Copy first, verify, then delete the source by hand. That order costs you two minutes and removes any chance of losing the only copy.

7. Ask IT to Turn On Long Path Support

Windows 10 version 1607 and every version since carry a setting that lifts the 260-character limit. It is worth requesting for a team that genuinely works this deep — with realistic expectations attached.

  1. Send your IT helpdesk a ticket that names the setting precisely. Copy this wording: "Please enable the Win32 long paths policy on my machine — Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths. Files in our synced SharePoint library exceed 260 characters and cannot be opened or copied."
  2. Include the actual path that failed and the exact error text you saw. A path they can paste and reproduce turns a two-day ticket into a ten-minute one — see How to Submit an Effective IT Support Ticket.
  3. Expect a restart. The setting takes effect after the machine reboots, not immediately.
  4. Understand what it does and does not do. The setting removes the limit at the Windows level, but each individual app has to be written to take advantage of it. File Explorer still stops at 260 characters in most builds. Older desktop applications, some installers, and a number of Office add-ins do the same. Command-line tools and modern apps honour it.
  5. Keep Steps 2 to 6 in reach regardless. Even on a machine with long paths enabled, shortening the tree is the fix that works in every app, for every colleague, on every device.

Note: Nothing about this setting is available to a standard user account, and there is no per-folder version of it. If a colleague tells you to edit HKEY_LOCAL_MACHINE in the registry yourself, the change is blocked for your account and the attempt is logged. The ticket in Step 1 is the route.

Troubleshooting

WARNING

Copy files out of a deep folder and confirm they arrived before deleting anything from the original location. Robocopy has a /MOVE option that deletes the source as it goes, and a deletion from a network drive or a folder outside OneDrive does not always land in a Recycle Bin you can reach. Use /E as shown in Step 6, check the results, then remove the originals yourself.

Symptom / ErrorPotential CauseSolution
The file name(s) would be too long for the destination folderDestination path plus file names exceed 260Extract or copy into a short folder such as C:\Temp (Step 3), or shorten a folder name at the destination (Step 2).
File will not rename or delete, no error givenFile Explorer cannot open the path at allUse subst to give the parent folder a drive letter (Step 4), then rename or delete from there.
OneDrive shows a red circle and Path too longSynced path over 260 locally, or over 400 in the cloudShorten a folder name near the top of the synced tree (Step 2). For other sync errors, see How to Fix OneDrive Sync Problems — Pending, Stuck, or Files Not Uploading.
Renaming the folder is blockedThe folder belongs to another account or a shareCheck what access you hold before assuming it is the path — see How to Fix "You Need Permission to Perform This Action".
Compressing to ZIP fails partway throughSource tree too deep for the built-in toolShorten one folder name (Step 2), then compress again.
Error persists after IT enabled long pathsThe app itself is not long-path awareFile Explorer and older apps still stop at 260. Shorten or relocate the folder (Steps 2 and 3) — that works in every app.