Using the LFNBK Utility

Most hard disk utility programs released before Windows 95 require updating to work correctly with Windows 95. If you use a hard disk utility that was not created especially for use with Windows 95, you might lose long filenames and you are at risk of losing data. Examples of such programs include the 
following:

* Norton Utilities® by Peter Norton Computing
* PC Tools  by Central Point Software, Inc.
* Microsoft Defragmenter for MS-DOS version 6.0, 6.2, 6.21, or 6.22
* Stacker 4.0 by STAC Electronics

In special cases, you might need to run backup or disk management utilities created for older versions of Windows or MS-DOS that are not compatible with the extended file system capabilities of Windows 95. Or you might need occasionally to run an application that is not compatible with long filenames. In such cases, you can use the LFNBK utility to remove (and later restore) long filenames on a disk.

To install the LFNBK utility:
* From the Windows 95 compact disc, copy LFNBK.EXE to the Windows directory on your computer.

CAUTION
The LFNBK utility is intended for use only by experienced Windows 95 users with special needs for compatibility with older disk utilities. It is not intended for everyday use by average users. Microsoft recommends that users rely on the disk management utilities included with Windows 95 or use Windows 95-compatible utilities from other vendors, rather than attempting to use older utilities that are not compatible with Windows 95.

Notice also that the DriveSpace utility included with Windows 95 is compatible with long filenames and can be used without LFNBK to manage compressed disks created with older versions of DriveSpace or DoubleSpace.

The following shows the syntax for LFNBK:

lfnbk [/v] [/b | /r | /pe] [/nt] [/force] [/p] [<drive>]

The following table describes the parameters for this command.
	
/v	Reports actions on the screen.
/b	Backs up and removes long filenames on the disk.
/r 	Restores previously backed-up long filenames.
/pe	Extracts errors from backup database.
/nt	Does not restore backup dates and times.
/force	Forces LFNBK to run, even in unsafe conditions.
/p	Finds long filenames, but does not convert them to 8.3 filename 
aliases. This reports the existing long filenames, along with the 
associated dates for file creation, last access, and last modification of 
the file.

To preserve long filenames with disk utilities that do not recognize them:

1. Turn off tunneling.
To do this, in the System option in Control Panel, click the Performance tab, and then click File System. In the File System Performance dialog box, click the Troubleshooting tab, and check the option named Disable Long Name Preservation for Old Programs.

2. Close all other applications. LFNBK cannot rename open files.

3. At the command prompt, type lfnbk /b [<drive>] to back up and remove long filenames.

4. Restart the computer, and then run the disk utility. If it is an MS-DOS - based utility, run it in MS-DOS Mode. For a Windows-based utility, run it in the usual way.

5. At the command prompt, type lfnbk /r [drive] to restore long filenames.

6. Turn tunneling on again, and then restart the computer. 

The LFNBK utility actually renames each file with a long filename to its associated alias. The filename changes are stored in the LFNBK.DAT file in the root of the drive where you are running LFNBK. This file is used to restore long filenames (when you run LFNBK with the /r switch). 

The following list provides some brief notes for using the LFNBK utility:

* You cannot use LFNBK to repair long filename problems.

* LFNBK might not be able to rename files with exact matches to long-filename aliases (i.e. the associated 8.3 name paired with each long-file name), and the related alias is not guaranteed to be the same as before running LFNBK.

* After you run LFNBK and then restart Windows 95, the default Start menu will appear, rather than your custom Start menu. After you run lfnbk /r to restore long filenames, your custom Start menu will also be restored.

* If the directory structure changes after you run lfnbk /b, then long filenames cannot be restored with lfnbk /r. For example, if you run a disk utility that prunes or removes subdirectories, LFNBK cannot restore the long filenames within those subdirectories.
