How to Enable Long File Paths in Windows Registry

By default, the Windows operating system enforces a legacy 260-character limit on file paths, known as MAX_PATH. This article outlines the specific Windows Registry key and DWORD value used to remove this limitation system-wide, allowing compatible applications and processes to create and read file paths up to 32,767 characters.

The Registry Setting for MAX_PATH Override

To enable long file paths system-wide, modify the LongPathsEnabled value located within the FileSystem registry key.


Step-by-Step Configuration Using Regedit

  1. Press Win + R, type regedit, and press Enter to open the Registry Editor.

  2. Navigate to the following location:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  3. Locate the value named LongPathsEnabled in the right-hand pane.
    (If it does not exist, right-click an empty area, select New > DWORD (32-bit) Value, and name it LongPathsEnabled.)

  4. Double-click LongPathsEnabled, change the Value data field from 0 to 1, and ensure the Base is set to Hexadecimal or Decimal.

  5. Click OK.

  6. Restart your computer or sign out and back in for the changes to take full effect across all system processes.


Enabling Long Paths via PowerShell (Administrator)

Alternatively, you can apply this registry setting directly using an elevated PowerShell prompt:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1

Important Considerations