NotFoundError during folder upload
What does the NotFoundError mean?
The NotFoundError typically occurs for one of the following reasons:
- File path too long:
The complete file path (including the folder structure, subfolder names, and file name) exceeds the 260-character limit imposed by the Windows operating system (MAX_PATH). This limit can prevent files from being accessed or uploaded. - Authorization issues:
You might lack the necessary permissions to access or upload certain files or folders. This is especially common in shared or corporate environments. - Corrupted or missing files:
One or more files within the folder may be corrupted or no longer accessible.
How to resolve the error?
If the error is caused by the file path length, we recommend this solution:
Reduce the folder path length
- move files to a less nested folder: Change from: C:\Documents\Projects\Work\Year2024\September\PersonalFiles\File1.pdf to C:\Documents\File1.pdf.
- Rename folders or files to shorten their length.
Tip: You can use free software to quickly check the path lengths and identify those exceeding 260 characters.
Note on Operating Systems
The NotFoundError is primarily linked to the limitations of the Windows operating system, which imposes a maximum of 260 characters for the length of a file path (known as MAX_PATH). This limit includes the entire folder path and the file name.
What about other operating systems?
macOS: macOS supports much longer file paths (up to 1024 characters), so issues like this are rare.
Linux: Linux also has a higher limit (usually 4096 characters), making these errors unlikely.
If you are using Windows, we recommend following the solutions on this page to resolve the issue and enable the successful upload of your folders.