16.5 Long to DOS Conversions

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.

16.5.1 NetWare 4.x

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:

This Is The First Long File

THISISTH

This Is The Second Long File

THISIST0

This Is The Third Long File

THISIST1

This Is The Fourth Long File

THISIST2

(And so on)

(And so on)

This Is The EleventhLong File

THISIST9

This Is The Twelfth Long File

THISIS00

This Is The Thirteenth Long File

THISIS01

This Is The Fourteenth Long File

THISIS02

(And so on)

(And so on)

This Is The 112th Long File

THISI000

This Is The 113th Long File

THISI001

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:

This is a 1 time offer

THISISA1

This is a 1 time deal

THISISA2

This is a 2-day tour

THISISA3

This is a 2-week tour

THISISA4

We have a 2-day pass

WEHAVEA2

We have a 2-week pass

WEHAVEA3

We have a 2-month pass

WEHAVEA4

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.

This.File.Is.Long

THIS.LON

This.File.Is.Also.Long

THIS0.LON

This.File.Is.Really.Long

THIS00.LON

This.File.Is.Very.Long

THIS000.LON

This.File.Is.Too.Long

THIS0000.LON

This.File.Is.Much.Too.Long

THIS0001.LON

This.File.Is.Way.Too.Long

THIS0002.LON

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.

16.5.2 NetWare 5.x and 6.x

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:

Long File Name

LONG_F~1

Long File Names

LONG_F~2

Long File Naming

LONG_F~3

Long File Named

LONG_F~4

Long File Name and Time

LO4104~0

Long File Name and Number

LOC5EB~0

Long File Name and Date

LO7A0D~0

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:

File.With.Internal.Period

FILE~1.PER

File.With.Another.Internal.Period

FILE~2.PER

File.With.Third.Internal.Period

FILE~3.PER

File.With.Fourth.Internal.Period

FILE~4.PER

File.With.Fifth.Internal.Period

FI58C4~0.PER

File.With.Sixth.Internal.Period

FIE95F~0.PER

File.With.Seventh.Internal.Period

FI416E~0.PER