0X000000CE

Fix ERROR_FILENAME_EXCED_RANGE (0X000000CE) in Windows

Windows Errors Intermediate 👁 0 views 📅 May 27, 2026

File path too long error. Here's the direct fix: shorten the path or enable long paths in Windows 10/11. No BS.

You're trying to copy, move, or delete a file, and Windows throws ERROR_FILENAME_EXCED_RANGE (0X000000CE). The message says the file name or extension is too long. It's annoying, but the fix is straightforward.

The Quick Fix: Shorten the Path

Windows has a hard limit of 260 characters for a file path (that's the MAX_PATH constant from the Win32 API). If your path exceeds that — say C:\Users\John\Documents\Projects\2024\Q2\ClientName\Designs\Final\Art\Assets\Icons\very_long_filename_that_keeps_going_and_going.png — you'll hit this error. The fastest workaround is to rename parent folders to shorter names.

  1. Open File Explorer and navigate to the parent folder of the offending file.
  2. Right-click the folder and select Rename. Shorten it to something like Proj or Assets.
  3. Repeat for each folder level until the total path is under 260 characters.
  4. Now try copying or deleting the file again. It should work.

This works because Windows checks the full path length before performing any file operation. Shorten the path, and you bypass the check.

The Permanent Fix: Enable Long Paths in Windows 10/11

Shortening folders is a band-aid. If you regularly work with deep folder structures — like DevOps pipelines, code repositories, or design assets — you want Windows to support paths longer than 260 characters. Microsoft added this option in Windows 10 version 1607, but it's disabled by default.

Option A: Group Policy (Windows Pro or Enterprise)

  1. Press Win + R, type gpedit.msc, and hit Enter.
  2. Go to Computer Configuration > Administrative Templates > System > File System.
  3. Find Enable Win32 long paths — it's a policy named exactly that.
  4. Set it to Enabled.
  5. Click OK and restart the computer.

Option B: Registry Edit (Windows Home / All editions)

  1. Press Win + R, type regedit, and hit Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
  3. Find the DWORD LongPathsEnabled. If it doesn't exist, create it (right-click blank area > New > DWORD 32-bit).
  4. Set its value to 1.
  5. Close regedit and restart your PC.

Why this works: The registry key LongPathsEnabled tells the NTFS filesystem driver and the Win32 API to accept paths up to 32,767 characters (the NTFS limit). Without this flag, Windows truncates at 260 characters. Note that not all applications respect this setting — older programs compiled against the original Win32 API still fail. But modern apps like File Explorer, PowerShell, Visual Studio, and most .NET applications will handle long paths once this is enabled.

What Actually Happens Inside the OS

The error 0X000000CE is raised by the CreateFile, CopyFile, or DeleteFile Win32 function when the input path string exceeds MAX_PATH (260 chars). The function literally checks lstrlen(lpFileName) > MAX_PATH and bails out. The registry fix changes that guard to allow longer strings by prepending \\?\ to the path internally, which is the extended-length path prefix. The OS then passes the full path to the NT kernel directly, bypassing the legacy check.

Less Common Variations of This Error

Sometimes the error appears in unexpected places:

  • ZIP files with long internal paths. Extracting a ZIP that contains deeply nested folders can trigger this. Fix: extract to a short root path like C:\extract\ instead of C:\Users\Name\Downloads\.
  • OneDrive or SharePoint syncing. Microsoft's sync engine also enforces a 400-character limit on total path length. If a file path exceeds that, it throws a similar error. Shorten folder names or move the folder closer to the root of the synced directory.
  • Node.js or npm projects. The node_modules folder gets deep fast. On Windows, npm install can fail with this error. The fix: enable long paths in the registry (Option B above) and then run npm cache clean --force before retrying the install.
  • Git operations. Cloning a repo with deeply nested files can fail. Enable long paths and use git config --system core.longpaths true to tell Git to handle them.
  • Windows Search indexing. When the indexer encounters a file path over 260 characters, it skips it silently. You might not see the error, but the file won't appear in search results. Shorten the path to fix this.
Note: If you're on Windows 11, the Group Policy setting is the same. The registry key is available too. I've tested both on Windows 11 23H2 and they work identically to Windows 10.

How to Prevent This Error Going Forward

The only reliable prevention is to avoid deep folder structures. Keep your directory tree shallow — no more than 4 or 5 levels deep. For example, instead of \Projects\2024\Q2\Client\Final\Assets\, use \2024\Client\Assets\ and name files with dates in the filename. Enable long paths via registry on every new Windows install as a standard setup step. If you work with code repos, add core.longpaths true to your global Git config from day one.

Run this in PowerShell to check if long paths are currently enabled:

Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled

If it returns 0 or nothing, long paths are disabled. Set it to 1 and reboot.

Was this solution helpful?