The Dirty Little Secret of Long Filenames

If you depend on your backup tapes to re-create a crashed hard drive, you need to know that a design flaw in Windows long filenames (LFN) means that your carefully made backup tapes may be nearly useless. This is a deficiency in Windows itself, a flaw in how long filenames and long directory names are implemented. Backup software can do nothing to work around the problem. Image backup is the only way to make a fully reliable backup under Windows.

Warning

Read and heed these words: It is impossible to make a reliable file-by-file backup under Windows if the volume uses long filenames or long directory names.

The problem occurs because Windows assigns aliases to long directory names on the fly, as those directories are created, and then uses those generated aliases in the registry. For example, if you install Microsoft Office, it installs to the folder C:\Program Files\Microsoft Office. But when Windows creates the Microsoft Office subfolder in the C:\Program Files folder, it dynamically creates a short alias for the new folder. So, rather than the registry pointing to Word as C:\Program Files\Microsoft Office\Office\Winword.exe, as it appears in a directory listing, the registry might actually point to C:\PROGRA~1\MICROS~3\OFFICE\WINWORD.EXE.

So far, so good. The problem is that Windows nowhere directly links that short directory name to the long directory name. As you use the system, you may create and delete other directories with long names ...

Get PC Hardware in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.