This article was reviewed by Carter Keel and by wikiHow staff writer, Hannah Dillon. Carter Keel is a tech expert and content creator based in Florida. In 2019, Carter launched his channel Random But Cool, refining his skills as a storyteller and video editor through this project. His production experience grew further through wedding videography, livestream switching, and managing media at multiple churches. His channel now focuses primarily on tech education, helping thousands of people stay safe online. He also specializes in building home servers and repurposing old hardware, combining sustainability with innovation. Carter is currently pursuing a bachelor’s degree in cybersecurity from the University of West Florida.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 1,124 times.
If you're getting an error that your file path is too long, you may be wondering how exactly to fix it. This issue commonly occurs when trying to unzip a file, though you may experience it when opening or creating a file or folder, as well. Windows has a maximum path length of 260 characters, but you can enable longer paths in the Registry Editor or the Group Policy Editor. You can also try simpler methods, such as renaming or moving the file. Keep reading to learn more.
Fixing the "Path Too Long" Error
- Use a PowerShell command to enable long file paths in the registry.
- Alternatively, you can manually edit the registry yourself to enable long file paths.
- If you have access to Group Policy Editor, edit the group policy to allow long paths.
- You can also try moving the file, using 7-Zip, or renaming the file.
Steps
Using a Command
-
Open a PowerShell window with admin privileges. To do this, type powershell into the taskbar search bar, then right-click on PowerShell in the Start menu and click Run as administrator.
-
Paste the command to change the registry. If you don't want to change the registry yourself, you can use a command to do it for you. Copy and paste New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force into the PowerShell window.
- It's still recommended to back up your registry before continuing, just in case something goes wrong.
Advertisement -
Press ↵ Enter. This will run the command, and your registry will be changed. You can now exit PowerShell.
-
Reboot your computer. To make sure all applicable applications know that this registry entry has been changed, you'll need to restart your PC.[1]
- Some applications may not have been modified to accept long paths. The developers of individual applications will need to declare that their apps are long path-aware.
- Enabling long file paths won't let you create longer file paths in File Explorer. Jump ahead to see which third-party file managers work with longer paths.
Using Registry Editor
-
Open the Registry Editor. If you don't want to use the command from the first method, you can also manually edit the registry yourself. To open the Registry Editor, type registry editor into the taskbar search bar and click Registry Editor.
- Before editing the registry, make a backup. Editing the registry incorrectly can cause your computer to stop working properly.
-
Navigate to the FileSystem folder. To do this, click the address bar at the top of the screen and highlight it. Copy and paste the following path into the address bar, then press ↵ Enter: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
-
Right-click LongPathsEnabled. Near the top of the list in the FileSystem folder, you'll see the "LongPathsEnabled" DWORD. Right-click it to open a menu.
-
Click Modify…. This will open a pop-up.
-
Change the "Value data" to 1. Under the "Value data" heading, you'll see a text box that says 0. Click into this box and change the 0 to a 1.
-
Click OK. You can now close the Registry Editor.
-
Reboot your computer. To make sure all applicable applications know that this registry entry has been changed, you'll need to restart your PC.[2]
- Some applications may not have been modified to accept long paths. The developers of individual applications will need to declare that their apps are long path-aware.
- Enabling long file paths won't let you create longer file paths in File Explorer. Jump ahead to see which third-party file managers work with longer paths.
Using Group Policy Editor
-
Open the Group Policy Editor. To do this, type gpedit into the taskbar search bar, then click Edit group policy in the Start menu that pops up.
- The Group Policy Editor can only be used if you have the Pro, Enterprise, or Education version of Windows. If you have the Home edition, you'll need to use the PowerShell method or Registry Editor method.
-
Navigate to the File System folder. To do this, double-click on the following folders in the left-hand sidebar in Group Policy Editor: Computer Configuration > Administrative Templates > System > File System.
-
Double-click on Enable Win32 long paths. This will open a new window.
-
Click Enabled. In the upper-left corner of the screen, you'll see that there are three radio buttons: Not Configured, Enabled, and Disabled. Click the radio button next to "Enabled."
-
Click Apply > OK. You can now close the Group Policy Editor.
-
Reboot your computer. To make sure all applicable applications know that the group policy has been changed, you'll need to restart your PC.[3]
- Some applications may not have been modified to accept long paths. The developers of individual applications will need to declare that their apps are long path-aware.
- Enabling long file paths won't let you create longer file paths in File Explorer. Jump ahead to see which third-party file managers work with longer paths.
Expert Q&A
Video
Tips
References
- ↑ https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
- ↑ https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
- ↑ https://www.youtube.com/watch?v=-0D6Om6vm1E
- ↑ Carter Keel. Tech Expert. Expert Interview
- ↑ Carter Keel. Tech Expert. Expert Interview
- ↑ https://www.elevenforum.com/t/the-files-names-would-be-too-long-for-the-destination-folder-error.17388/#post-334793






















