Issue
Users attempting to open ZIP files created through the zip download feature on Box.com may encounter errors when trying to unzip or open the archive using Windows Explorer.
Error message: "Windows cannot open the folder. The Compressed (zipped) Folder '{zip_path}' is invalid."
Root Cause
This issue occurs when the ZIP file contains a file or folder whose path length is 260 bytes or more. For example, if you download a folder containing a file nested in directories such that its full path reaches 260 bytes or longer, the generated ZIP archive cannot be opened, and an error message appears.
- Example of a problematic path (260 bytes):
このパスのバイト数は260です1\このパスのバイト数は260です2\このパスのバイト数は260です3\このパスのバイト数は260です4\このパスのバイト数は260です5\このパスのバイト数は260です6\1234567890.txt
The error does not occur if the path length is 259 bytes or less.
- Example of a valid path (259 bytes):
このパスのバイト数は259です1\このパスのバイト数は259です2\このパスのバイト数は259です3\このパスのバイト数は259です4\このパスのバイト数は259です5\このパスのバイト数は259です6\123456789.txt
* The file names are UTF-8 encoded when zipped during download from Box.
Resolution
To resolve this issue, users can take one or more of the following actions:
- Shorten Folder or File Names: Reduce the length of folder names in the directory structure before downloading so that no individual file path exceeds 260 bytes.
- Use Alternative Extraction Tools: Instead of relying on Windows Explorer, use third-party archiving tools such as 7-Zip, which do not have the same path length limitations and can handle longer paths without error.
- Reorganize Directory Structure: Flatten or reorganize the folder hierarchy to reduce overall path length.