07-11
19

Data Recovery Techniques for Windows (8)

Cloudy Happy

Authoreric   Category Related Resource   Comments0   Post Time 2007-11-19 20:25:44 -0500

To maintain this backward compatibility, files that use long file names make use of a DOS alias -- an alternate file name that fully conforms to DOS naming conventions. This is necessary not only because of the length of the filename, but also because long file names make use of characters that are not normally allowed by the FAT or FAT-32 file systems.

Because of these limitations, it is impossible to save a long file name directly to a FAT or FAT-32 file system. When you save a file with a long file name to these types of file systems, the file is actually saved under its DOS alias. For example, if we saved a file named "Allen’s File.txt" to a FAT file system, the file would actually be saved as ALLENS~1.TXT.

Let's take a closer look at how the DOS alias works. You will notice in my example that the ~ is inserted where the space would normally occur. This is just a coincidence. The ~ does not take the place of a space. Instead, the DOS alias is created by taking the first six valid characters of the filename, and then appending a ~, then a number.

The reason for the number is because it is theoretically possible that multiple files could potentially be broken down into the same DOS alias. For example, the file names "Allen's File" and "Allen's Document" would both have the same DOS alias because the first six characters of the filenames are identical. To prevent this from becoming a problem, DOS aliases are numbered. If these two files existed on a disk, their DOS aliases would be ALLEN~1 and ALLEN~2.

Okay, so files with long names are saved to the disk using their DOS alias rather than their long file names. Where does the rest of the file name go? As we alluded to earlier, Windows is able to save long file names to the disk by making use of multiple directory entries. Any time a file with a long name is written to the disk, the file itself is saved using the file's DOS alias as a file name. However, Windows writes a second file to the disk that is used to hold the file's long file name.

If you look at a long file name entry through Edit Sector function of Partition Table Doctor, you'll see it is not actually a file. If you look at a disk's file allocation table through Edit Sector function of Partition Table Doctor, you'll see that the entry in the ID column identifies the object type of the directory entry. Usually, this object type is set to either File or Erased. But in the case of a long file name entry, the ID column is set to LFN, indicating that the entry is a part of a long file name rather than an actual file.

The long file name directory entry itself can contain up to 13 characters. A normal DOS file name can contain up to 12 characters. There is the 8-character filename, a period and a 3-character file extension. Long file names use all 12 positions, plus one extra character for their own purposes. We have no idea where the 13th character comes from; if you know, please send us a mail.

Trackback URL Trackback: http://blog.easeus.com/action.php?action=tb&id=103

Tags Tags: Partition Table Doctor,Data Recovery,windows,data recovery

Comments List

Post a Comment

  • Name:
  • Email:
  • HomePage:
  • Comment:
  • Question:

Home | Solution | About Company | Contacts | Resource | Blog | Forum | Directory | Links | Sitemap

Copyright © 2005-2008 CHENGDU YIWO Tech Development Co., Ltd. ALL RIGHTS RESERVED.

Privacy Policy | License | Legal Counsel