"File Path too Long" on Windows when Unzipping
Last modified by Eleni Cojocariu-testing account on 2026/08/21 17:09
Content
Explanation
Unzipping the XWiki distribution on Windows can stop with a "file path too long" error, leaving the extraction incomplete.
Cause
Windows limits a full file path to about 260 characters, as described in the maximum path length limitation. The distribution nests its files deeply, so extracting it into a folder that is itself deep in the tree pushes some of those paths past the limit.
Solution
Any one of the following avoids the limit:
- Extract the archive close to the root of the drive, into a folder with a short name such as C:\xwiki.
- Extract it with PowerShell:
Expand-Archive -Force C:\path\to\XWiki.zip C:\where\to\extract\XWiki - Enable long paths system-wide, which takes both of the changes below and a restart of the computer:
- In the Windows Registry, set LongPathsEnabled to 1 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
- In the Group Policy Editor, opened by pressing Win + R and typing gpedit.msc, go to "Computer Configuration", then "Administrative Templates", "System" and "File System"; double-click "Enable Win32 long paths", select "Enabled" and click "Apply".
- Extract it from the cygwin environment, which is not subject to the limit.
- Extract it with a third-party archiver, such as one of these file archivers for Windows.