[REBUILDING THE DESKTOP]
Contents:

Type and Creator Codes:

The MacOS has always had the ability to launch the appropriate application by double-clicking (or Opening) a document file. This is possible because the Finder stores file type and creator codes in the Desktop File, and uses the desktop file to display icons and launch applications.

All Macintosh files have a "type" and "creator" code stored within them. The Finder uses these 4-character codes to associate the appropriate icons to files, and launch the correct application when files are opened. A "type" code represents the kind (and format) of the data within the file. "TEXT" and "PICT" are two common file types. Applications can specify proprietary file types in a BNDL resource that the Finder reads and stores in the Desktop File; an application like Microsoft Word has almost 20 different type codes associated with its data and application files. Since files with standard type codes (such as "TEXT") can be opened by several different applications, every application also has a unique "creator" code associated with it. When an application creates a file, it assigns the file the appropriate type code, and also gives it the application's creator code. When that file is opened, the Finder looks up the creator code in the Desktop File and opens the document in the application associated with it. With the introduction of System 7.x and Macintosh Easy Open, the Finder can present a dialogue box if it cannot find the creator application on the hard drive. The dialogue box presents a list of applications that can open the documnet's file type. The dialogue box also lists applications that can open the file if it is automatically translated by Dataviz and/or Claris XTND translators.


What are the Desktop Files?:

The "Desktop File" actually refers to two files; one a database of "type" and "creator" codes, and the other storing the various icons associated with them. If the "desktop file" is corrupted, files may not be displayed with the correct icon, or they may be opened in the wrong application. If the Desktop File contains old or outdated information (perhaps a newer version of an application has been installed), similar symptoms may appear. The Desktop File has been linked to unexplained crashes and freeses, it is usually a good idea to periodically rebuild the Desktop File to keep its contents up to date; but if you are experiencing problems, rebuilding the desktop doesn't hurt and may solve the problem.

The Desktop Files are invisible files stored in the root level of every Macintosh volume. Hard drives (or hard drive partitions), CD-ROM drives, and floppies all contain Desktop files containing information concerning the files present on the volume.


Rebuilding the Desktop Files:

As the finder loads, it mounts the volumes attatched to the Macintosh. When it mounts each volume, it reads the volume's Desktop File . "Rebuilding" the desktop file means deleting the old Desktop Files and creating new ones by scanning the contents of the volume.
To rebuild the Desktop File
  1. Turn on or restart the Macintosh
  2. Wait until all the Extensions and Control Panels have loaded
  3. As soon as the startup icons on the bottom of the screen disapear, hold down the command and option keys simulatenously
  4. The Finder should ask you if you are sure you want to rebuild the desktop file. Click "Ok".
  5. If there are multiple volumes, click "Ok" for each as the Finder asks you if you want to rebuild the Desktop for them

The only side effect from rebuilding the Desktop File that any information stored in the "Comments" field of a file is lost. You can see the "Comments" field by selecting a file and choosing "Get Info..." from the Finder's "File" menu. Because rebuilding the desktop file deletes any information stored here, the comments field has never been utilized by average users. Unless the comments field contains important information, it is safe to rebuild the any time the computer is started up. Do not force-quit the finder in order to rebuild the desktop; restart the computer.