How to Enable Long Paths in Windows 11

Last updated on November 9th, 2026 at 01:45 pm

To enable long paths in Windows 11, open Settings, select System > Advanced, and turn on Enable long paths in the File Explorer section. If your PC doesn’t show that switch, set the LongPathsEnabled registry value to 1 or turn on the Enable Win32 long paths policy, then restart. All three routes change the same Windows setting.

Applies to: Windows 11 (Home, Pro, Enterprise, and Education; the Settings switch needs version 25H2 or later).

What the long paths setting changes

A path is the full address of a file: the drive letter, every folder name, and the file name. Many Windows programs are limited to a value called MAX_PATH, which is defined as 260 characters. That count includes the drive letter, the colon, the backslashes, and an invisible ending character, so the usable part is closer to 256 characters. A file buried in a deep folder tree, such as a project folder inside a synced cloud folder, can pass that limit quickly. To see how long a path really is, copy the file’s full path in Windows 10 from File Explorer and paste it into a text editor.

Starting with Windows 10 version 1607, Microsoft removed the MAX_PATH limit from many common file and folder functions, but only when you opt in. Windows 11 has the same opt-in. Two conditions both have to be met before a program can use longer paths:

  • Windows: the LongPathsEnabled registry value must exist and be set to 1. The Settings switch and the Group Policy setting in this article both control this value.
  • The app: the program’s developer must have marked it as long-path aware. This is a setting inside the app (its manifest, using an element named longPathAware) that you can’t change yourself.

The second condition is the reason turning the setting on fixes some programs and not others. Once both conditions are met, a path can be far longer (the exact limits are in the FAQ below).

Is it safe to enable long paths in Windows 11?

It’s a documented, supported Windows setting with an official switch in Settings, and you can reverse it at any time. The risk is practical rather than technical: once some programs can create very long paths, older programs that aren’t long-path aware may be unable to open, copy, or back up those files.

What does the \\?\ prefix do?

It’s a way for programs and scripts to request an extended-length path directly, for example \\?\D:\very long path. The prefix tells Windows to skip its usual path processing and pass the text straight to the file system. It’s mainly useful to developers and in scripts; it isn’t something to type into every app.

Admin account, edition and version

  • Use an administrator account. The registry value lives under HKEY_LOCAL_MACHINE, which applies to the whole PC, and the PowerShell command for it has to run in a terminal with elevated privileges.
  • Check your edition and version. Right-click Start, choose Settings, select System, then About, and look under Windows specifications. The version tells you whether to expect the Settings switch, and the edition tells you whether the Group Policy method is available.
  • Save your work. A restart is the most reliable way to make every program notice the change.

Enable long paths in Settings

This is the shortest route and it doesn’t involve editing the registry by hand. The Advanced page is in Windows 11 version 25H2 and later, where it replaces the older For developers page.

  1. Right-click Start and choose Settings. The Settings window opens.
  2. Select System in the left column.
  3. Select Advanced. The page lists groups of settings such as Taskbar, File Explorer, and Terminal.
  4. In the File Explorer group, find Enable long paths. Its description reads “Remove MAX_PATH limitations from common Win32 file and directory functions.”
  5. Turn the switch on.
  6. Restart the PC so programs that were already running pick up the new setting.
Illustration of the path to the Enable long paths switch in Windows 11 Settings: Settings, System, Advanced, File Explorer, Enable long paths
Illustration: the Settings path to the Enable long paths switch in Windows 11.

If there is no Advanced entry under System, or the File Explorer group has no long paths switch, your PC doesn’t have that page yet. Use the registry method below; it works on every edition.

Enable long paths in the registry (all editions)

The registry is the database where Windows stores its settings. Improper registry changes can cause serious problems, so change only the value described here. You have three ways to set it; pick one.

Option 1: Registry Editor

  1. Press the Windows logo key + R, type regedit, and press Enter. If Windows asks for confirmation or an administrator password, approve it. Registry Editor opens.
  2. In the left pane, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and select the FileSystem key.
  3. Optional backup: with FileSystem selected, choose File > Export, pick a location and a file name, and select Save. You can restore that file later with File > Import.
  4. Look in the right pane for LongPathsEnabled. If it’s there, right-click it and select Modify.
  5. If it isn’t there, open the Edit menu, point to New, select DWORD (32-bit) Value, type LongPathsEnabled, and press Enter. Then open the Edit menu and select Modify.
  6. In the Value data box, type 1 and select OK.
  7. Close Registry Editor and restart the PC.

Option 2: One PowerShell command

Open Windows Terminal as an administrator. One way is to press the Windows key + X to open the Quick Access menu and choose the Terminal entry marked (Admin). In a PowerShell tab, run this command as a single line:

New-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem” -Name “LongPathsEnabled” -Value 1 -PropertyType DWORD -Force

The command creates the value if it’s missing and overwrites it if it already exists. Restart the PC afterward.

If you prefer Command Prompt, the built-in Reg tool does the same job from an administrator window:

reg add “HKLM\SYSTEM\CurrentControlSet\Control\FileSystem” /v LongPathsEnabled /t REG_DWORD /d 1 /f

In that command, /v names the value, /t sets its type, /d supplies the data, and /f adds it without asking for confirmation.

Option 3: A .reg file

A .reg file is a small text file that writes registry values for you, which is handy when you set up several PCs. Paste these lines into Notepad and save the file with a name that ends in .reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
“LongPathsEnabled”=dword:00000001

To apply it, open Registry Editor, choose File > Import, select the file, and select Open. Restart the PC afterward.

Enable long paths with Group Policy (Pro, Enterprise, Education)

The long paths policy is available in the Pro, Enterprise, Education, and IoT Enterprise editions. If Windows can’t find gpedit.msc on your PC, you’re most likely on Windows 11 Home; use Settings or the registry instead. Other ways to start the editor are in opening the Group Policy Editor in Windows 11.

  1. Press the Windows logo key + R, type gpedit.msc, and press Enter. The Local Group Policy Editor opens.
  2. In the left pane, expand Computer Configuration > Administrative Templates > System, then select Filesystem.
  3. In the right pane, double-click Enable Win32 long paths. A window opens with three choices: Not Configured, Enabled, and Disabled.
  4. Select Enabled, then select Apply.
  5. Close the editor and restart the PC. To apply policy without waiting, you can also run gpupdate /force in a terminal first; that command reapplies all policy settings.

The policy’s own description says it lets “manifested win32 applications and packaged Microsoft Store applications” reach paths beyond the normal 260-character limit. That wording is the same app condition described earlier: the program has to be built for it.

Which method should you use?

Method Works on Best for
Settings > System > Advanced Windows 11 version 25H2 and later Most home users; no registry editing
Registry Editor, PowerShell, Reg, or a .reg file Every edition, including Home PCs without the Settings switch; scripted setups
Local Group Policy Editor Pro, Enterprise, Education Administrators who manage settings through policy

Does this work on Windows 11 Home?

Yes. Use the registry method, or the Settings switch if your version of Windows 11 has the Advanced page. Only the Group Policy route is listed for Pro, Enterprise, and Education.

Confirm it worked, or turn it off again

To check the setting, open a terminal and run:

reg query “HKLM\SYSTEM\CurrentControlSet\Control\FileSystem” /v LongPathsEnabled

The result should list LongPathsEnabled with a value of 1. You can also reopen Settings > System > Advanced and confirm the switch is on. For a practical test, repeat the task that failed, using the same program, after the restart.

To undo the change, reverse whichever method you used: turn the Settings switch off, change the Value data for LongPathsEnabled back to 0, or set the policy to Not Configured or Disabled. Then restart. Before you turn it off, shorten or move any folders that only work because of the setting, since programs may no longer be able to open them.

Long-path errors that won’t go away

The error is still there after you enabled long paths

Restart first. The registry value is cached by each process after its first file operation, so a program that was already running keeps the old behavior, and a reboot might be required for every app to see the change. If the error survives a restart, the program itself probably isn’t long-path aware. Try the same file in a different program to confirm, check the program’s documentation or updates for long path support, or shorten the path.

File Explorer still refuses a long name

The shell (the Windows interface, which includes File Explorer) and the file system have different requirements, and a path can be created through the Windows API that the shell cannot interpret properly. In practice, a command-line tool or a long-path-aware program may handle a file that a File Explorer window will not. Moving the folder closer to the root of the drive, such as C:\Work, or renaming folders to shorter names is the dependable fix there.

Git says “Filename too long”

Git for Windows has its own switch, core.longpaths, which is disabled by default. The option enables paths longer than 260 characters for Git’s built-in commands, but some related tools don’t support them. After turning on the Windows setting, you can run git config –global core.longpaths true and then repeat the clone or checkout.

The setting turns itself off or the policy is locked

On a work or school PC, this setting can be managed centrally as a policy that organizations push through device management. A value set by your organization can be reapplied over a local change, so ask your IT administrator rather than fighting it.

gpedit.msc or the Advanced page is missing

Neither is required. The registry value is what Windows actually reads, and the Registry Editor, PowerShell, and Reg options work without the Settings page or the policy editor.

You get an access denied message

The terminal or Registry Editor isn’t running with administrator rights. Close it, reopen it as an administrator, and repeat the step. On a standard account you’ll need an administrator’s password.

Do I have to restart after enabling long paths?

A reboot might be required, because programs that started before the change keep using the old setting. Restarting the PC is simpler than working out which programs need to be closed and reopened.

What is the maximum path length after I turn it on?

The maximum total path length for extended-length paths is 32,767 characters. Each single folder or file name is still limited by the file system, commonly to 255 characters.

Why does one program still show a “path too long” error?

Because the Windows setting is only half of the requirement. The program also has to declare itself long-path aware, which is up to its developer. Until it’s updated, keep that program’s files in shorter paths.

Does the setting shorten or change my existing files?

No. It only removes a limit for programs that support it. Existing files, folder names, and shortcuts stay as they are.

The technical details behind this setting, including the full list of affected functions, are in the Maximum Path Length Limitation documentation, with the list of options on the Windows Advanced settings page. If the path error was the only thing in your way, restart now and rerun the task that failed.