When using the Desktop App, depending on the operating system (OS) you are using, file and folder names and their lengths can have different restrictions. Creating files and folders with allowed names or maximum lengths on one OS, may have issues or even can´t be synced because of different rules in another OS. This page gives you a brief overview of limitations regarding file and folder names on different operating systems.
|This is not an ownCloud rule but an OS dependency
Here are some rules of thumb
Though each file system has its limits as described in Wikipedia: Comparison of file systems, you normally will rarely reach them. On the other hand, when using programming interfaces (APIs) to create files, this can change, especially on Windows and in particular when using the Virtual Files (VFS) feature. Here, with the default Windows setting, the path component for a file created via API is limited to 260 characters - which can be reached quickly.
When using the Desktop App for Windows with VFS configured, files may not be able to be synced if the source file was created in an environment where the path component exceeded the 260 character limit.
In such a case, the Desktop App notifies the user about the inability of syncing the particular file.
To overcome the maximum path length limitation of 260 characters, Microsoft has provided a solution document where they describe the opt-in process to relax the path length limitation when using API calls, like VFS does when creating files and folders.
:(colon - sometimes works, but is actually NTFS Alternate Data Streams)
|(vertical bar or pipe)
If your files are created via a program, do not use non-printable characters. See the Wikipedia "Control code chart" section for more information on ASCII control characters.
While it is legal under Linux/Unix file systems to create files with control characters in the filename, they might be inaccessible and/or unsyncable.
0-31 (ASCII control characters)
The following file names are reserved:
CON, PRN, AUX, NUL COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9
When the Desktop App is on Linux/Unix and the target mount to sync on is on SMB, you cannot have the same file or folder name but with different casings. A cross icon will be shown that indicates that the file can’t be synced. Files on Linux/Unix must comply with the Windows rules for successful syncing.
Filenames cannot end in a space or dot
When creating a file in Linux/Unix like
my-filename.(see the dot at the end) or
my-filename.LPT1(see the reserved name LPT1), you can sync the file to your ownCloud if the mount target is Linux/Unix. When a Windows user tries to sync these files, Windows rejects the file. Comparing the file list in both environments shows that one side has more files than the other. There will be no notification as this is an OS dependency.
When renaming an existing file in Linux/Unix by just changing the casing like
ownCloud, you might get issues on the windows sync side as for Windows the file looks the same.