We show you the easiest way first
Do you get a “Path Too Long” error while extracting a ZIP archive on your Microsoft Windows 10 or Windows 11 PC? You may have exceeded the maximum character limit allowed for your folders and files. We’ll show you how to fix that as well as other underlying items to resolve your problem.
Some reasons Windows displays the above error are that your ZIP’s file name is too long, your parent folder has a lengthy name, your ZIP itself has a problem, and File Explorer is acting up.
Rename Your ZIP File
The easiest way to fix Windows’ “Path Too Long” error is by renaming your ZIP file. If your ZIP file has a lengthy name, shortening the name will allow you to bypass the above error.
Renaming your file doesn’t change the contents within.
- Open a File Explorer window and find your ZIP file.
- Right-click your file and choose Rename. Alternatively, single-click your file and press F2 on your keyboard.
- Enter a new short name for your file and press Enter.
- Right-click your ZIP file and choose Extract All.
- Select Extract on the following window.
Rename Your Parent Folder to Shorten the File Path
If your ZIP file’s parent folder has a lengthy name, that may be why you’re getting a “Path Too Long” error. In this case, shorten your folder’s name, and your issue will be resolved.
The reason this method works is that shortening your folder name ensures you’re well within Windows’ allowed character limit for your folders and files.
- Locate your ZIP’s parent folder in a File Explorer window.
- Right-click your folder and choose Rename. Alternatively, select the folder and press F2.
- Type a new short name for your folder and press Enter.
- Open the folder, right-click your ZIP file, choose Extract All, and select Extract.
Extract Your ZIP in Your Drive’s Root Folder
Another way to ensure you’re well within the allowed character limit for directories is by extracting your ZIP’s contents in your drive’s root folder. This way, you won’t have any subdirectories, preventing Windows from displaying the “Path Too Long” error.
- Open the folder that has your ZIP file, right-click the file, and choose Copy.
- Open your drive’s root folder.
- Right-click anywhere blank in the folder and choose Paste.
- Extract your ZIP’s contents by right-clicking the archive, selecting Extract All, and choosing Extract.
Turn On Long Paths on Windows
Windows allows you to have up to 260 characters in your paths by default. The system will display a “Path Too Long” if you exceed this limit. Luckily, you can increase this limit on your system by toggling on an option in Registry Editor or Local Group Policy Editor.
You should enable long paths on your Windows PC if you often work with files that exceed the default limit.
Using Registry Editor
If you’re a Windows Home edition user, use this Registry Editor method to enable long paths on your PC. Windows Pro edition users can also use this method, but the Local Group Policy Editor method below will be easier for you.
- Open the Run dialog box using Windows + R.
- Type the following in the box and press Enter:
regedit - Select Yes in the User Account Control prompt.
- Navigate to the following path in Registry Editor:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem - Open the LongPathsEnabled entry located on the right.
- Enter 1 in the Value data field and select OK.
- Close Registry Editor and reboot your PC.
- Extract your ZIP file.
Using Local Group Policy Editor
- Open the Run box using Windows + R.
- Type the following in the box and press Enter:
gpedit.msc - Navigate to Computer Configuration > Administrative Templates > System > Filesystem using the left sidebar.
- Open the Enable Win32 long paths entry given on the right.
- Select Enabled on the open window and choose Apply followed by OK at the bottom.
- Close Local Group Policy Editor and restart your PC.
- Unarchive your ZIP file.
Extract Your ZIP Using Command Prompt or PowerShell
If you still get a “Path Too Long” error, try using Command Prompt or PowerShell to extract your archive’s contents. These utilities unarchive your archives the same way File Explorer does.
Using Command Prompt
- Open Start, find Command Prompt, and launch the tool.
- Type the following command in CMD and press Enter. Here, replace PATH with the path where your ZIP file is located.
cd PATH - Then, run the following command replacing FileName.zip with the name of your ZIP file.
tar -xf FileName.zip
The command will extract your files in the same folder as the ZIP file.
Using PowerShell
- Open Start, find PowerShell, and launch the utility.
- Type the following command in PowerShell and press Enter. Here, replace SourcePath with the path to your ZIP file and TargetPath with the path where you want to extract your archive.
Expand-Archive -LiteralPath “SourcePath” -DestinationPath “TargetPath”
Fix Windows File Explorer to Resolve Long Error
If you still can’t extract your ZIP archive and get a “Path Too Long” error, your File Explorer utility may be faulty. In this case, you can use your system’s built-in SFC (System File Checker) tool to try to fix your file manager.
- Open Start, find Command Prompt, and select Run as administrator.
- Choose Yes in the User Account Control prompt.
- Type the following command on the CMD window and press Enter: sfc /SCANFILE=C:\Windows\explorer.exe
- Next up, use the following command:
sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe - Try to extract your archive.
Troubleshooting the Path Error on Windows PCs
There are multiple ways to get around Windows’ “Path Too Long” error and extract your archives successfully. You can try to keep your file names’ under the allowed limit, or you can expand the default path limit to bypass the error.
Either way, your issue will be fixed, and you’ll be able to extract your files without any problems.