When a file is created on the server using a long name, the server automatically generates a corresponding DOS name for the file as well. This section describes the different (basic) conventions used in automatic LONG to DOS name conversions, which vary depending on the NetWare OS version you are using:
NOTE:Since there are many circumstances in which the generated name varies (depending on the file names that already exist in the directory), you should never assume that the generated DOS name is equal to a predictable value.
For NetWare 5.x and 6.x, the algorithms are slightly more complex than the examples documented here. You might see slightly different behaviors on these more recent NetWare versions, especially if you use 8-bit ASCII characters. Also, the NSS and traditional file systems might generate slightly different names in many situations.
The NetWare 4.x OS has a convention for shortening long names without periods in the first eight characters and another slightly different convention for shortening long names that have periods in the first eight characters.
If a long name has no periods, the first eight valid DOS characters become the shortened DOS name. Spaces between words of the long name are omitted. A file extension (if there is one) is retained, up to three letters.
Duplicate short names are resolved by replacing letters of the short name (not the extension) with ascending zero-based decimal numeric digits, beginning with the final letter. If necessary, an increasing number of final letters are replaced, always starting with a set of zeros. The following table illustrates the scheme:
IMPORTANT:If one or more files are deleted, subsequent duplicate short names re-use the deleted names in ascending order before new short names are generated. For example, in the table above if "This Is The Fourth Long Name" and "This Is The Twelfth Long Name" were deleted, the next two files with inital letters "THISISTH" would be shortened to "THISISH2" and "THISIS00" before "THISI002" were generated.
If the eighth character of the long name is already a number, duplicate file naming begins with that number unless it is already used. For example, files in the same directory would be shortened as follows:
If a long name contains a period prior to the first eight letters, the letters preceding the first period are the shortened name, and the first three letters following the final period become a file extension. Duplicate long names are shortened by adding a zero to the first duplication, two zeros to the second, and so on until letters and appended zeros make up eight characters. The next duplication begins a counting process by replacing the final zero with the digit 1.
Again, if a file is deleted, the next duplicate file is assigned the short name of the deleted file before any new short names are generated.
With NetWare 5.x and 6.x OS long names are shortened into DOS style shorter names in a consistent way that has very little variation. The first six characters are retained for four files, followed by a tilde then the digits 1 through 4. Any spaces in the first six characters are replaced with underscores. Starting with the fifth duplicate file name, only the first two characters are retained. The next four characters are replaced with random hexadecimal digits, followed by a tilde and a zero. The following table illustrates:
If the long file name contains a period in the first six characters, the first four duplicate file names are shortened to the characters preceding the first period, followed by a tilde and the digits 1 through 4. The first three characters following the final period are retained as a file extension. Starting with the fifth file, random numbers are generated as explained above. The following table illustrates the renaming: