Going back to your roots


Tip
Long file names are great. Carefully used, they make it about 255 times easier to figure out what's in all those files on your system. But make sure to keep them out of the root directory (folder) of each drive on your computer.
Most hard disks permit only 512 directory entries in the root directory. This may seem like plenty, but the number is misleading. That's because long file names occupy more than one directory entry -- one for the short file name equivalent (eight characters plus a three-letter extension) plus any successive entries needed to store the long name. If you have a lot of folders in the root directory, each with a long file name, you can soon run into the 512 limit. (You don't have to worry about this limit, though, for objects you put in directories other than the root.)
You might think the solution would be to name all files and folders in your root directories with short file names. But even that approach may not work, because Windows 95's file names are case sensitive. For example, if you create a folder named SalesDoc (or even Salesdoc), you're still taking up two directory entries -- one that stores the DOS equivalent, and one that stores the version with the uppercase and lowercase letters.
To be sure you're not taking up unnecessary directory entries, do this: in Windows Explorer, choose View--Options. Make sure the View tab is in front. Uncheck the box Hide MS-DOS file extensions for file types that are registered (if necessary) and click OK. This step ensures that you rename an entire file, not just the part before the extension. Then in your root directory, select a file or folder (but not the Program Files folder or any other folder that contains programs) and press <F2>. Type a short name for the folder in all uppercase letters, and press <Enter>. The folder name will reappear in lowercase except for the first letter and will occupy only a single directory entry.
To confirm that you've really eliminated extra directory entries, open a DOS window, type cd\, and press <Enter> to get to the root directory. Then type dir /p and press <Enter> again. Examine all the file names on the left and right sides of the list. If each name on the left has the same capitalisation and length as its corresponding name on the right, you know it is using only one directory entry. Press <Space> to continue the directory listing; repeat this examination until you've looked over all the items in the root.
Finally, return to Windows Explorer, choose View--Options, and restore your preferred setting for hiding extensions.
Of course, there are other reasons to keep your root (or any folder) clean: it's a lot easier to find files if you sort them into a logical hierarchical structure rather than overloading one folder with hundreds of files.
- Scott Dunn

Remove extra directory entries from long file names and from short file names with internal capitalisation. Matching names on the left and right sides of the DOS listing indicate a single directory entry.


Category: Win95
Issue: Aug 1997
Pages: 170

These Web pages are produced by Australian PC World © 1997 IDG Communications