Languages

Archived - Mac OS: File Type and Creator Codes, and File Formats

Files stored by Mac OS 9 and earlier contain 4-character file type and creator codes, which are used by the Finder and applications. This article describes Mac OS file type and creator codes, and includes a short section on the concept of file formats.

This article has been archived and is no longer updated by Apple.
The native file system used by Mac OS 9 and earlier includes a provision for each file to contain a file type and creator code. FIle types and creator codes are 4-character text strings embedded within the file along with other information about the file (for example, the file's name, its creation and modification dates, and so forth). Through the use of type and creator codes, the Finder can determine which application(s) can open a particular file.

File Type Codes

The desktop database keeps track of the file type of every file. Here are examples of some common 4-character file type codes, followed by descriptions:

  • CWWP (AppleWorks word processing)
  • MooV (QuickTime movie)
  • TEXT (plain text file)
  • PICT (picture file)
  • GIFf (GIF image)

When you open a file from within an application, the application looks at each file's 4-character file type code to see if it can be opened. Some applications can open a variety of file types.

Creator Codes

The desktop database also keeps track of the creators of files. As you might guess, this is a 4-character code that identifies which program actually created the file. Here are examples of some common 4-character creator codes, followed by descriptions:

  • BOBO (AppleWorks)
  • TVOD (QuickTime)
  • ttxt (SimpleText)
  • Hway (iMovie)

For example, a text file saved with SimpleText has a file type of TEXT and a creator of ttxt.

You can find out the type and creator of a file using a utility such as ResEdit, or by dragging a file onto the Custom Search Options window in Sherlock, or through the use of an AppleScript application/droplet.

File Formats

A file format is a set of rules and instructions that are used to read and write files. Some file formats are publicly known, while others are proprietary. Examples of publicly known file formats:

  • text
  • Rich Text Format (RTF)
  • binhex

Examples of proprietary file formats:
  • AppleWorks word processing document
  • FileMaker database

When an application reads in a file it expects certain information, in a certain order. Usually there is a header, where global information about the particular file is kept. Then there might be a database of objects if it is a drawing program, or some text if it is a word processor.

File formats used by various applications are never needed by the ordinary user, but may be needed by developers who are writing translators or other utilities.

Last Modified: Feb 20, 2012
Print this page
  • Last Modified: Feb 20, 2012
  • Article: TA25699
  • Views:

    15139
  • Rating:
    • 60.0

    (29 Responses)