I'm trying to use FreeFileSync for backup of user files from workstations running Windows Vista OS and specially like the support for long file names, but somehow this feature doesn't work for me. Can someone explain it to me how this feature works? I also tried adding "\\?\" in front of the file path, but the end result was the same.
Here is an example of an error message that almost regularly shows up in the log files of FreeFileSync:
"Cannot copy file "\\?\C:\temp\bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla.msg" to "\\?\C:\temp2\bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla.msg.ffs_tmp".
Error Code 123: The filename, directory name, or volume label syntax is incorrect. (CopyFileEx)"
In the example shown above the destination file name is 273 characters and that's why I suspected this could be a problem with long file names. But sometimes the same error appears with file names with length of just 194 characters like the following example:
"Cannot copy file "C:\temp\BLA BLA BLA BLA\D\My documents BLA\BLABLA\БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА.pdf" to "\\15.15.1.15\testtest\backup\D\BLA BLA BLA BLA\D\My documents BLA\BLABLA\БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА БЛА.pdf.ffs_tmp".
Error Code 123: The filename, directory name, or volume label syntax is incorrect. (CopyFileEx)"
The difference between the two examples is in the usage of Cyrillic letters in the file name and network share for the destination location. The privileges of the network share are setup correctly because other files get copied without problem. Also regular file copy of the problematic files between the two locations through windows explorer interface can be done without any problem.
I'm using the latest version of Free File Sync 6.15.
Problem with long file names
- Posts: 2
- Joined: 28 Apr 2015
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
The windows API by default supports paths with up to 260 chars. This limit can be exended to support paths with 32.767 chars, which is what FreeFileSync does.
However even in this later case additional constraints apply:
A component within a path must not exceed 255 characters, which is the problem in your first example.
The second example however looks fine and also copies correctly from and to local NTFS drives with FreeFileSync, so this looks like a limitation of this network share.
More info:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath
However even in this later case additional constraints apply:
A component within a path must not exceed 255 characters, which is the problem in your first example.
The second example however looks fine and also copies correctly from and to local NTFS drives with FreeFileSync, so this looks like a limitation of this network share.
More info:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath
- Posts: 2
- Joined: 28 Apr 2015
Thank you for the quick reply Zenju and for pointing me to the right direction.The windows API by default supports paths with up to 260 chars. This limit can be exended to support paths with 32.767 chars, which is what FreeFileSync does.
However even in this later case additional constraints apply:
A component within a path must not exceed 255 characters, which is the problem in your first example.
The second example however looks fine and also copies correctly from and to local NTFS drives with FreeFileSync, so this looks like a limitation of this network share.
More info:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpathZenju
I'm using Synology NAS as a Backup location, which has a linux based OS. I found out that Linux has a limitation of 256 bytes for file names, which for English letters (that use one byte per character) translates to 256 characters, but for Cyrillic letters (that use two bytes per character) translates to maximum of 127 characters if all of the letters used are Cyrillic.