This information was provided by Claris Corporation on 16 March 1998, and incorporated into Apple Computer's Tech Info Library.
For the first four files with similar names:
If necessary, truncate the filename to the first six characters in the name and the first three characters in the extension.
Add the suffix ~<number> to the remaining six-character file name.
For Example, Let's say you had a filename called "MYTESTFILE.TXT". This would get truncated to "MYTEST~1.TXT".
If you had several files that were similar in name the results would be as follows"
LFN DOS Name
MYTESTFILE.TXT MYTEST~1.TXT
MYTESTFILE1.TXT MYTEST~2.TXT
MYTESTFILE2.TXT MYTEST~3.TXT
MYTESTFILE3.TXT MYTEST~4.TXT
For successive files:
If necessary, truncate the filename to the first two characters in the name and the first three characters in the extension.
Use a hashing algorithm to generate the next four characters
Append ~1 to the remaining six-character file name
If that fails to generate a unique name, append ~2, and so forth.
LFN DOS Name
MYTESTFILE4.TXT MYDDDA~1.TXT
MYTESTFILE5.TXT MYEDDE~1.TXT
MYTESTFILE6.TXT MYDDDE~1.TXT
MYTESTFILE7.TXT MYEEDA~1.TXT
MYTESTFILE8.TXT MYDDEA~1.TXT
Because the process can generate filenames that are difficult to interpret, it is good practice to keep the unique portion of the filename in the first six characters whenever possible
If this does not result in a unique filename, only the first five characters of the NTFS filename are used, followed by the tilde and two digits.
When filenames are moved from a FAT partition to an NTFS partition, no conversion takes place because NTFS fully supports the FAT file naming convention.