LFNit! and file name preservation
Posted: Fri Oct 07, 2005 12:40 pm
Does LFNit! make any attempt to preserve the short 8.3 filename associated with a long filename? If so, is this a well-tested feature? This is very important for a backup operation, as many programs, including Windows itself, use and store short filename internally. For example, the registry is littered with them!
Please also note that Windows NT uses a different LFN aliasing algorithm than Windows 9x. NT creates the first 4 aliases LONGNA~1 to LONGNA~4 the same, but after that, replaces all but the first two characters with a hash.
A simple, but very effective test is as follows:
1. Create a directory, such as C:\TEST.
2. In the directory, create the two subdirs SRC and DST
3. In the SRC directory, use a DOS box, or Windows Explorer, to create the files:
LongName001.txt
LongName002.txt
LongName003.txt
LongName004.txt
4. In the DOS box, you should get a listing such as:
LONGNA~1.TXT LongName001.txt
LONGNA~2.TXT LongName002.txt
LONGNA~3.TXT LongName003.txt
LONGNA~4.TXT LongName004.txt
5. Delete the LongName002.txt file. In the DOS box, you should now get the listing:
LONGNA~1.TXT LongName001.txt
LONGNA~3.TXT LongName003.txt
LONGNA~4.TXT LongName004.txt
6. Use LFNit! to backup the long filenames in the SRC directory
7. Use a non-LFN-aware program to copy the files from SRC to DST. In the DST directory, you should now get the listing:
LONGNA~1.TXT LONGNA~1.TXT
LONGNA~3.TXT LONGNA~3.TXT
LONGNA~4.TXT LONGNA~4.TXT
8. Use LFNit! to restore the backed-up long filenames to the files in DST
9. Compare the directory listings for SRC and DST. They should be *identical*. Pay particular attention to the short name associated with each long name.
Please also note that Windows NT uses a different LFN aliasing algorithm than Windows 9x. NT creates the first 4 aliases LONGNA~1 to LONGNA~4 the same, but after that, replaces all but the first two characters with a hash.
A simple, but very effective test is as follows:
1. Create a directory, such as C:\TEST.
2. In the directory, create the two subdirs SRC and DST
3. In the SRC directory, use a DOS box, or Windows Explorer, to create the files:
LongName001.txt
LongName002.txt
LongName003.txt
LongName004.txt
4. In the DOS box, you should get a listing such as:
LONGNA~1.TXT LongName001.txt
LONGNA~2.TXT LongName002.txt
LONGNA~3.TXT LongName003.txt
LONGNA~4.TXT LongName004.txt
5. Delete the LongName002.txt file. In the DOS box, you should now get the listing:
LONGNA~1.TXT LongName001.txt
LONGNA~3.TXT LongName003.txt
LONGNA~4.TXT LongName004.txt
6. Use LFNit! to backup the long filenames in the SRC directory
7. Use a non-LFN-aware program to copy the files from SRC to DST. In the DST directory, you should now get the listing:
LONGNA~1.TXT LONGNA~1.TXT
LONGNA~3.TXT LONGNA~3.TXT
LONGNA~4.TXT LONGNA~4.TXT
8. Use LFNit! to restore the backed-up long filenames to the files in DST
9. Compare the directory listings for SRC and DST. They should be *identical*. Pay particular attention to the short name associated with each long name.