Valid Characters for Files and Folders
The following characters are not supported in file and folder names:
|<||Less than sign|
|>||Greater than sign|
Due to limitations in Microsoft Windows, these characters are not allowed when creating, saving, or renaming files, folders, and shortcuts. They are supported in MacOS, but files and folders created with these characters may not be displayed or processed properly in Windows.
Avoid using these characters in file and folder names in cross-platform environments.
File and Folder Name Length
The maximum file and folder name length is 255 bytes. We save file and folder names with UTF-8 encoding, so each character may consume 1 to 5 bytes. For example, the English alphabet, numbers, etc., need a single byte. Greek, Cyrillic, etc., needs two bytes. Most of the CJK characters, Emoji, etc., requires 3 bytes.
Because of the differing byte lengths for different characters, file and folder maximum length may be fewer characters than expected. For example, if all of the characters in the file name are Japanese Hiragana, the maximum length is 85 characters.
Path Name Length Limitation
In addition to the file and folder name length limitations, the Windows operating system has a path length limitation, which is 260 characters (not bytes). However, Windows 10 version 1607 and later can override this restriction. Please refer Enable Long Paths in Windows 10.
Note that exceeding this path length limitation also requires support in the application. Notably, Windows File Explorer may still be limited to 260 characters. Some possible workarounds:
- Reduce folder name lengths or folder depth.
- Map the path as a drive letter in File Explorer or use subst.
- Use Powershell to access the path or use Robocopy to do recursive copies with deep paths.