SMB Shortnames When a Long-name Already Exists
This article applies to: Shared File Services
In order to maintain compatibility with older forms of PC operating systems, the SMB (or CIFS) protocol includes shortnames. These are often referenced as a “DOS name” or “eight dot three name”. The 8.3 is the character format of a shortname with 8 ASCII characters followed by a period and then 3 characters (representing the filename extension).
This becomes a problem when we need to recover or migrate data where long and short names coexist. If, in the process of a restore or a robocopy, the long-name is written to a destination first, the shortname will be in conflict with it and will produce an error. For example, if you have a file named “AbCdEfGh-0111.txt” written first, when trying to copy the corresponding 8.3 name “ABCDEF~1.TXT“ to the same folder, an error will occur.
For this reason, SFS cannot guarantee recovery of data if long and short named files co-exist in the same folder. There are ways around this.
- The first one is to clean up the data. If the long-name and shortname files have identical content and both are in the same folder, remove the shortname file.
- The second is to robocopy the files by first sending the 8.3 names followed by long-name files.
- Another option is to add replication to your share.
For technical details, refer to the Microsoft SMB specifications.
Comments?
To share feedback about this page or request support, log in with your NetID