DOS 8.3 File Names Changing with Restore

See what happens when you try to restore a sequence of 8.3 filenames from a tape backup. The results might surprise you.

Readers

July 27, 1999

3 Min Read
ITPro Today logo in a gray background | ITPro Today

[Editor's Note: Do you have something to share with other Windows NT Magazine readers? We want to know about it. Write for Reader to Reader online, and you can tell others about your NT discoveries, comments, problems, solutions, and experiences. Email your contributions (700 words or less) to [email protected] along with your name and phone number. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100.]

For legacy reasons, my company must run certain programs that still make use of the 8.3 DOS filenames associated with the now more familiar long filenames. The file maintenance procedures in question are extremely stable, so I was surprised to discover an unusual condition when I backed up and restored certain files formatted with 8.3 filenames. Rather than describe the circumstances in detail, let me provide an example.

Suppose I create a directory that contains several similarly named files (in reality, these were financial audit files containing an automatically generated sequence number). I obtained the following directory listing for these files by typing dir /x at the command prompt:

Volume in drive C has no label.Volume Serial Number is B49D-A5D7 Directory of C:Backup Test05/31/99  11:27a                            .05/31/99  11:27a                            ..05/31/99  11:22a                    18 TESTFI~1.TXT    TestFile1.txt05/31/99  11:22a                    17 TESTFI~2.TXT    TestFile2.txt05/31/99  11:22a                    17 TESTFI~3.TXT    TestFile3.txt05/31/99  11:23a                    19 TESTFI~4.TXT    TestFile4.txt               6 File(s)             71 bytes                            939,101,696 bytes free

If I delete one of these files (or change the filename so that it no longer conforms to the 8.3 base sequence) and type dir /x at the command prompt again, I get the following directory listing:

Volume in drive C has no label.Volume Serial Number is B49D-A5D7 Directory of C:Backup Test05/31/99  11:53a                              .05/31/99  11:53a                              ..05/31/99  11:22a                    18 TESTFI~1.TXT    TestFile1.txt05/31/99  11:22a                    17 TESTFI~3.TXT    TestFile3.txt05/31/99  11:23a                    19 TESTFI~4.TXT    TestFile4.txt               5 File(s)             54 bytes                            939,099,648 bytes free

Even though I've deleted TESTFI~2.TXT, the remaining files are still linked in sequence. Next, I backed up the directory to tape using NT Backup. If I later decide to restore this directory from the backup tape to a new directory or to the original directory, which has been cleared, I run into problems. (The latter option is important because the condition does not seem to occur when I restore the directory by overwriting or replacing existing files of the same long filename.) The effect of the restore is as follows:

Volume in drive C has no label.Volume Serial Number is B49D-A5D7 Directory of C:Backup Test05/31/99  11:57a                                   .05/31/99  11:57a                                   ..05/31/99  11:22a                    18 TESTFI~1.TXT    TestFile1.txt05/31/99  11:22a                    17 TESTFI~2.TXT    TestFile3.txt05/31/99  11:23a                    19 TESTFI~3.TXT    TestFile4.txt               5 File(s)             54 bytes                            939,098,112 bytes free

Notice that the DOS 8.3 names are now out of sequence with their associated long filenames. In my particular situation, this problem produced some unexpected results because the effects were more complex than what I've demonstrated in this simple example.

Although this feature might be well-known and documented, nobody else I have spoken with has considered the consequences. We can expect this problem will go away with the demise of DOS 8.3 filenames, but in the meantime, be aware if you still have legacy requirements.

—Brian E. Rockett
[email protected]

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like