在Microsoft Windows 10(Microsoft Windows 10)或 Windows 11 PC上提取ZIP存档时是否遇到“路径太长”错误(get a “Path Too Long” error)?您可能超出了文件夹和文件允许的最大字符数限制。我们将向您展示如何修复该问题以及其他基础项目来解决您的问题。
Windows显示上述错误的一些原因是您的ZIP文件名太长、您的父文件夹名称过长、您的 ZIP 本身有问题(your ZIP itself has a problem)以及文件资源管理器出现故障。

重命名您的 ZIP 文件
修复 Windows“路径太长”错误的最简单方法是重命名 ZIP 文件(renaming your ZIP file)。如果您的ZIP文件的名称很长,缩短名称将允许您绕过上述错误。
重命名文件不会更改其中的内容。
- 打开文件资源管理器(File Explorer)窗口并找到您的ZIP文件。
- 右键单击您的文件并选择重命名(Rename)。或者,单击文件并按键盘上的 F2。

- 输入(Enter)文件的新短名称,然后按Enter。
- 右键单击您的ZIP文件并选择全部解压(Extract All)。

- (Select Extract)在以下窗口中
选择“提取” 。
重命名父文件夹以缩短文件路径(File Path)
如果您的ZIP文件的父文件夹名称很长,这可能就是您收到“路径太长”错误的原因。在这种情况下,缩短文件夹的名称(shorten your folder’s name),您的问题就会得到解决。
此方法有效的原因是缩短文件夹名称可确保您的文件夹和文件不超出Windows允许的字符限制。
- 在文件资源管理器(File Explorer)窗口中找到ZIP的父文件夹。
- 右键单击您的文件夹并选择重命名(Rename)。或者,选择文件夹并按 F2。

- 为您的文件夹输入一个新的短名称,然后按Enter。
- 打开该文件夹,右键单击您的ZIP文件,选择全部解压(Extract All),然后选择解压(Extract)。
将ZIP(ZIP)解压缩到驱动器的根文件夹中(Root Folder)
确保完全符合目录允许的字符限制的另一种方法是将ZIP的内容提取到驱动器的根文件夹中。这样,您将不会有任何子目录,从而防止 Windows 显示“路径太长”错误。
- 打开包含ZIP文件的文件夹,右键单击该文件,然后选择“复制”(Copy)。
- 打开驱动器的根文件夹。
- 右键单击(Right-click)文件夹中的任意空白处,然后选择“粘贴”(Paste)。

- (Extract)右键单击存档,选择全部提取(Extract All),然后选择提取,(Extract)提取ZIP的(ZIP)内容。
在 Windows 上打开长路径
默认情况下,Windows 允许路径中最多包含 260 个字符。如果超过此限制,系统将显示“路径太长”。(Path Too Long)幸运的是,您可以通过切换注册表编辑器(Registry Editor)或本地组策略编辑器(Local Group Policy Editor)中的选项来增加系统上的此限制。
如果您经常处理超出默认限制的文件,则应在 Windows PC 上启用长路径。
使用注册表编辑器
如果您是Windows 家庭版用户(Windows Home edition user),请使用此注册表编辑器(Registry Editor)方法在您的 PC 上启用长路径。Windows专业(Pro)版用户也可以使用此方法,但下面的本地组策略编辑器(the Local Group Policy Editor)方法对您来说会更容易。
- Windows + R打开“运行”(Run)对话框。
- 在框中输入以下内容并按 Enter:
regedit
- 在用户帐户控制(User Account Control)提示中选择是(Yes)。
- 导航到注册表编辑器(Registry Editor)中的以下路径:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem
- 打开位于右侧的LongPathsEnabled条目。(LongPathsEnabled)

- 在数值(Value)数据字段中输入 1 ,然后选择确定。

- 关闭注册表编辑器(Registry Editor)并重新启动您的电脑。
- 解压缩您的 ZIP 文件。
使用本地组策略编辑器
- 使用Windows + R打开“运行”(Run)框。
- 在框中键入以下内容并按 Enter:
gpedit.msc
- 使用左侧边栏
导航到Computer Configuration > Administrative Templates > System > Filesystem
- 打开右侧给出的启用 Win32长路径条目。(Enable Win32)

- (Select)在打开的窗口中选择“启用”,然后选择“应用”(Apply),然后选择底部的“确定”。

- 关闭本地组策略编辑器(Close Local Group Policy Editor)并重新启动您的电脑。
- 解压您的 ZIP 文件。
使用命令提示符(ZIP Using Command Prompt)或PowerShell提取ZIP
如果您仍然收到“路径太长”错误,请尝试使用命令提示符(Command Prompt)或PowerShell提取存档的内容(extract your archive’s contents)。这些实用程序以与文件资源管理器(Explorer)相同的方式取消归档您的档案。
使用命令提示符
- 打开“开始”(Start),找到“命令提示符”(Command Prompt),然后启动该工具。
- 在CMD(CMD)中键入以下命令,然后按Enter。此处,将PATH替换为(PATH)ZIP文件所在的路径。
光盘路径
- 然后,运行以下命令,将FileName.zip替换为(FileName.zip)ZIP文件的名称。
tar -xf 文件名.zip

该命令会将您的文件解压到ZIP(ZIP)文件所在的文件夹中。
使用PowerShell
- 打开“开始”(Start),找到“PowerShell”,然后启动该实用程序。
- 在PowerShell(PowerShell)中键入以下命令并按Enter。在这里,将SourcePath替换为(SourcePath)ZIP文件的路径,将 TargetPath 替换为您要提取存档的路径。
Expand-Archive -LiteralPath“SourcePath”-DestinationPath“TargetPath”

修复 Windows 文件资源管理器(Fix Windows File Explorer)以解决长错误(Long Error)
如果您仍然无法提取ZIP存档并收到“路径太长”错误,则您的文件资源管理器实用程序可能有问题(your File Explorer utility may be faulty)。在这种情况下,您可以使用系统内置的SFC(系统文件检查器(System File Checker))工具来尝试修复您的文件管理器。
- 打开“开始”(Start),找到“命令提示符”(Command Prompt),然后选择“以管理员身份运行”(Run)。
- (Choose Yes)在用户帐户控制提示中(User Account Control)选择是。
- 在CMD(CMD)窗口中输入以下命令并按Enter键:sfc /SCANFILE=C:Windowsexplorer.exe

- 接下来,使用以下命令:
sfc /SCANFILE=C:WindowsSysWow64explorer.exe
- 尝试提取您的存档。
解决Windows PC
上的路径错误(Path Error)
有多种方法可以解决 Windows 的“路径太长”错误并成功提取存档(your archives)。您可以尝试将文件名保持在允许的限制以下,或者可以扩大默认路径限制以绕过该错误。
无论哪种方式,您的问题都将得到解决,并且您将能够毫无问题地提取文件。
How to Fix the “Path Too Long” Error on Windows
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.