Allow file paths longer than 260 characters — via Microsoft Learn
Removes the classic 260-character MAX_PATH limit for apps that declare they support long paths (PowerShell 7, Git, many developer tools). Handy when deep folder trees like node_modules break copies. It doesn't magically fix apps that aren't long-path aware.
Restart the computer
Group Policy
Open gpedit.msc (Pro, Enterprise and Education only) and go to:
Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths
Registry equivalent
Double-click a .reg file and confirm to merge it. Right-click → Edit first if you want to read it, which is always a good idea with any .reg file from the internet.
Apply
Windows Registry Editor Version 5.00
; Oddbyte.Me: Allow file paths longer than 260 characters
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001Undo
Windows Registry Editor Version 5.00
; Oddbyte.Me: undo Allow file paths longer than 260 characters
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000000Same thing from a command prompt
Run in an administrator Command Prompt or Terminal.
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 1 /fUndo:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 0 /fProcesses read the value once, so restart (or at least restart the affected apps). Apps must also include longPathAware in their manifest; File Explorer itself may still struggle with very long paths.Sources
- Maximum Path Length Limitation — by Microsoft Learn
- Policy CSP - ADMX_FileSys: LongPathsEnabled — by Microsoft Learn
- Administrative Templates (.admx) for Windows 11 2025 Update (25H2) — ADMX policy definitions — by Microsoft
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.