Quick Answer (for advanced users)
Rename the file or its parent folders to shorten the total path to under 260 characters. Or enable long path support in Windows via Group Policy or Registry (reboot required).
Why this happens
Windows has a hard limit of 260 characters for the full path of a file (drive letter + folders + file name + extension). This limit comes from the old FAT file system days. When you try to create, copy, or move a file that goes over that limit, you get ERROR_BUFFER_OVERFLOW (0x0000006F). The message says “The file name is too long.” This usually happens when you have deeply nested folders—like C:\Users\John\Documents\Project\Subfolder\AnotherSubfolder\YetAnother\FinalFolder\somefile.txt—and the file name itself is normal, but the full path pushes past 260.
On Windows 10 and 11, you can actually bypass this limit, but it's disabled by default. So the quickest fix is to shorten the path. But if you want a permanent solution, you can flip a setting that lets Windows handle paths up to 32,767 characters (true for NTFS drives). I'll show you both ways.
Fix Steps (main solution: shorten the path)
- Identify the file or folder that's too long. Look at the error message. It usually shows the file path. If not, open File Explorer and browse to the deepest folder you can reach.
- Rename the deep folder or file to a very short name. For example, rename “YetAnother” to “Y”. Or rename the file itself from “somefile.txt” to “s.txt”. Right-click the item, select Rename, type the short name, and press Enter.
- If renaming fails because the path is still too long, you need a different approach. Open a Command Prompt as Administrator. Navigate to the parent folder using
cdwith the 8.3 short name (if possible). Or use thedir /xcommand to see the short 8.3 names (likeYETANO~1). Then rename usingren YETANO~1 Y. - After renaming, try the operation again. Copy, move, or delete the file. It should work now because the total path is under 260 characters.
Alternative Fix: Enable long path support in Windows
If you regularly work with deep folder structures (developers, designers, database admins), the better fix is to enable long paths permanently. This works on Windows 10 (version 1607 and newer) and Windows 11.
Option A: Via Group Policy (Windows Pro, Enterprise, Education)
- Press Win + R, type gpedit.msc, hit Enter.
- Go to Computer Configuration > Administrative Templates > System > Filesystem.
- Double-click Enable Win32 long paths.
- Set it to Enabled, click OK.
- Reboot your computer. After restart, paths up to 32,767 characters will work.
Option B: Via Registry (all Windows editions, including Home)
- Open Registry Editor: press Win + R, type regedit, hit Enter.
- Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem - Find LongPathsEnabled. If it's not there, right-click in the right pane, choose New > DWORD (32-bit) Value, name it LongPathsEnabled.
- Double-click it, set the value to 1. Click OK.
- Close Registry Editor and reboot. That's it.
Prevention tips
- Keep folder structures shallow. Aim for no more than 3-4 levels deep. For example,
C:\Projects\ClientName\2025\Report.docxis fine. - Use short folder names. Instead of “January Financial Reports,” use “JanFinRp.”
- If you enable long paths, test your apps. Not all programs respect the new limit. Old software (like some backup tools or file explorers) will still fail with paths over 260 characters. Microsoft Office and modern apps handle it fine.
- When moving files from one drive to another, use robocopy. The command
robocopy Source Dest /E /COPYALL /DCOPY:Tcan handle long paths natively (especially if long paths are enabled). But without the Registry tweak, robocopy may still hit the same error.
Real-world scenario: A user had a folder path like
D:\Backups\Company\HR\EmployeeRecords\Terminated\2023\Smith_John\Payroll\FinalChecks\FinalPaystub.pdf. That's over 260 characters. The error appeared when trying to open the PDF from an old accounting app. Renaming “FinalPaystub.pdf” to “1.pdf” and “FinalChecks” to “F” solved it in 30 seconds. The long path Registry fix would have worked too, but IT didn't want to enable it company-wide yet.