Wiki source code of "File Path too Long" on Windows when Unzipping
Last modified by Eleni Cojocariu on 2026/02/17 09:37
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | While unzipping a file on Windows, you might encounter a "file path limit" error due to the system’s inability to handle file paths longer than 260 characters. | ||
| 2 | |||
| 3 | === Cause === | ||
| 4 | |||
| 5 | This issue arises because the Windows Operating System imposes a [[file path limit to around 260 characters>>https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath]] in older versions. The file path limit can be exceeded also during file extraction, especially if the file is stored in a deeply nested folder. | ||
| 6 | |||
| 7 | === Solution === | ||
| 8 | |||
| 9 | To solve this, you can try: | ||
| 10 | |||
| 11 | * Install in a folder that is as close to the root of the drive as possible and uses a small name, e.g. ##C:\xwiki##. | ||
| 12 | * Install XWiki using the [[cygwin>>https://www.cygwin.com/]] environment that overcomes this limitation. | ||
| 13 | * In Windows 10 and 11, you can enable long paths by making both following changes: | ||
| 14 | ** In the Windows Registry, set ##EnableLongPaths## to ##1## under ##HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem##. | ||
| 15 | ** In the Group Policy Editor by pressing ##Win + R##, typing ##gpedit.msc##, and navigating to ##Computer Configuration → Administrative Templates → System → File System##. Locate ##Enable Win32 long paths##, double-click it, select "Enabled", and click "Apply". //A system restart is required for the changes to take effect.// | ||
| 16 | * Use PowerSheel command((( | ||
| 17 | {{code language="none"}} | ||
| 18 | Expand-Archive -Force C:\path\to\XWiki.zip C:\where\to\extract\XWiki | ||
| 19 | {{/code}} | ||
| 20 | ))) | ||
| 21 | * Alternatively, you can install a third-party utility. See [[suggestions here>>https://sourceforge.net/directory/file-archivers/windows/]]. |