TechBuzzPro

How to Enable Long Filenames in Windows

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To enable long filenames in Windows, you need to change a single Group Policy or Registry setting: enable LongPathsEnabled and, on some systems, set the policy Enable Win32 long paths. This allows applications and Windows itself to handle file paths longer than the classic 260-character limit (the MAX_PATH limit). Without it, you may see errors like “The file name is too long” or “The specified path is too long” when copying, extracting, or saving files deep inside nested folders. The change is system-wide and requires a restart to take effect. Before you start, make sure you have administrator rights, because both methods require elevated access.

What You'll Need

  • Administrator account on the Windows PC (local admin or a domain account with permission to change system settings).
  • Windows 10 version 1607 or later, or Windows 11. Long path support is built in but disabled by default.
  • If you use Group Policy: Windows Pro, Enterprise, or Education edition. Home edition does not include the Group Policy Editor, so use the Registry method instead.
  • Optional: a backup of the registry (export the key before editing) in case you need to revert.

Step-by-Step

  1. Open the Group Policy Editor (Pro/Enterprise/Education only). Press Win+R, type gpedit.msc, and press Enter. If you are on Windows Home, skip to the Registry method below.
  2. Navigate to the long paths policy. In the left pane, go to Computer Configuration > Administrative Templates > System > Filesystem. The exact folder names may vary slightly by Windows version, but the path is consistent in current builds.
  3. Enable the policy. In the right pane, double-click Enable Win32 long paths. Select Enabled, then click OK.
  4. Apply the change. Close the Group Policy Editor. The policy takes effect after a restart, though some apps may pick it up immediately.
  5. If you are on Windows Home, use the Registry. Press Win+R, type regedit, and press Enter. Accept the User Account Control prompt.
  6. Navigate to the key. In Registry Editor, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
  7. Create or edit the value. In the right pane, look for a DWORD (32-bit) value named LongPathsEnabled. If it does not exist, right-click an empty area, choose New > DWORD (32-bit) Value, and name it LongPathsEnabled.
  8. Set the value to 1. Double-click LongPathsEnabled, set Value data to 1, and click OK. Base should be Hexadecimal.
  9. Restart your PC. Close Registry Editor and restart Windows. The setting is read at boot, so a restart is required for it to apply system-wide.
  10. Verify (optional). After restart, you can test by creating a deeply nested folder structure that exceeds 260 characters. If you can create and open files there without errors, long paths are working. Some older applications may still enforce their own limits, but Windows Explorer and modern apps should now handle longer paths.

Common Mistakes

  • Forgetting to restart. The registry and policy changes are not applied until the system reboots. Some users enable the setting and expect immediate results.
  • Editing the wrong registry key. The correct location is under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem. Do not create the value under HKEY_CURRENT_USER; it will not work.
  • Using the Group Policy Editor on Windows Home. gpedit.msc is not available on Home editions. Use the Registry method instead.
  • Assuming all apps support long paths. Even with the setting enabled, some older or third-party applications may still fail because they were not coded to handle paths over 260 characters. The change enables the OS-level support, but app compatibility varies.
  • Typing the value name incorrectly. It must be exactly LongPathsEnabled (no spaces, correct capitalization). A typo will have no effect.

Tips

  • Before editing the registry, export the FileSystem key as a backup: right-click the key, choose Export, and save the .reg file. If something goes wrong, double-click the file to restore.
  • If you manage multiple PCs, you can deploy the registry change via a script or Group Policy Preferences. The same DWORD value works across Windows 10 and 11.
  • Long path support is per-system, not per-user. Once enabled, all users on the machine benefit.
  • Some backup and sync tools (like older versions of robocopy or certain cloud clients) may still have their own path limits. Check the tool's documentation if you still see errors.
  • If you only need to work with long paths occasionally, you can use the \\?\ prefix in some commands and APIs, but this is not a system-wide fix. Enabling the policy is the proper solution.

Troubleshooting

If long paths still do not work after enabling the setting and restarting, check the following:

  • Confirm the registry value. Open Registry Editor and verify that LongPathsEnabled exists under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and is set to 1.
  • Check Group Policy precedence. If you used Group Policy, ensure the policy is not overridden by another policy. Run gpresult /h report.html in an elevated Command Prompt to see applied policies.
  • Test with a modern app. Try creating a long path using File Explorer or PowerShell. If it works there but not in a specific app, the app itself does not support long paths. Contact the app vendor or look for an update.
  • Run as administrator. Some operations that create long paths require elevated permissions. Try the same action in an elevated Command Prompt or PowerShell window.
  • Check for third-party limitations. Antivirus, backup, or file sync software may block long paths even when Windows supports them. Temporarily disable such software to test (re-enable afterward).
  • Revert if needed. If enabling long paths causes issues with legacy apps, set LongPathsEnabled back to 0 and restart. The change is reversible.

Frequently Asked Questions

Does enabling long paths affect all applications?

No. It enables the Windows API to accept paths longer than 260 characters, but each application must also be written to use the long-path-aware APIs. Modern apps and Windows Explorer generally work; some older apps may still fail.

Is it safe to enable long paths?

Yes, it is an official Microsoft-supported setting. However, some legacy applications may not handle long paths correctly, so test your critical software after enabling.

Can I enable long paths on Windows Home?

Yes, but you must use the Registry method because the Group Policy Editor is not included in Home editions. The registry change works on all editions.

Do I need to restart after changing the setting?

Yes, a restart is required for the change to take effect system-wide. Some apps may pick it up sooner, but a reboot ensures consistency.

Will this fix “filename too long” errors when extracting ZIP files?

It can help if the extraction tool respects the long path setting. Built-in Windows extraction and modern tools like 7-Zip generally do. If the error persists, the tool may have its own limit.

How do I undo the change?

Set LongPathsEnabled back to 0 in the registry, or disable the Group Policy setting, then restart. This restores the default 260-character limit.