Macintosh Type and Creator Codes

ResEdit-LogoOne of the things which makes Mac files different from their DOS and UNIX brethren is the inclusion of metadata in the file called “type” and “creator” codes. A part of the Macintosh file system from the very beginning, these two codes convey important information about what kind of document a file is and what program created the file.

The type and creator codes are four character strings, e.g., “TEXT” is a file of type Text. An equivalent kind of type identification is used in most operating systems (including Mac OS X) in the form of a three character extension after the filename, e.g., filename.txt.

The creator code is unique to Macintosh, in that it also tells the OS what program originally created the file: that this text file was created by Microsoft Word and not TeachText. Without a creator code, you can only define the default application to open all files of type “text” regardless of what app created the file. Other apps can still open the file, but the automatic function is limited.

Since OS X replaced OS 9, Apple has supported both type and creator codes, along with filename extensions, in the operating system, allowing either system to be used. As of the release of Snow Leopard Apple now supports primarily filename extensions under a concept they call Uniform Type Identifiers, or UTIs. We will defer to other informative postings about the merits and pitfalls of such a change.

ResEdit-WindowIn the Vintage Mac World, type and creator codes are still the way things work. I was recently reminded of this while doing a job to open and convert a batch of MOTU Performer compositions into Standard MIDI files, so they could be opened on a modern computer. Over the years the copies of these files had lost their Mac type and creator codes, and now only appeared as blank, unknown documents to my Mac Plus and copy of Performer.

Out of the misty past an old friend comes to the rescue: ResEdit, the “clown jewel” of early Mac geekdom. Specifically an editor for the resource fork of old Mac files — yet another difference between Mac and DOS files, and a topic for another column — the Get Info menu item brings up an edit window where you can set type and creator codes, along with lots of other Important Stuff like whether your file is Invisible or is “Inited” (to this day, I still don’t know what that means…)

I fired up Performer, created a new test file, and saved it to disk. I then did a Get Info on the test file in ResEdit to see what the correct type and creator codes should be: type = PERF and creator = MOUP. With the magic codes I then opened each Performer file individually (no batch conversion in ResEdit) and set the correct info. Once completed they all appeared to the Finder as MOTU Performer documents, and opened in that program when double clicked.

One reason people like the Mac is that “it just works!” Details like type and creator codes are one of the hidden reasons why.


3 responses to “Macintosh Type and Creator Codes”

  1. Adam Rosen says:

    ORIGINAL BLOGSPOT COMMENTS:

    Anonymous said…
    May I suggest the utility called FileType. It’s like ResEdit but it’s only for changing the type and creator codes. http://www.frederikseiffert.de/filetype/
    May 14, 2011 at 4:18 AM

  2. DFinnigan says:

    Inited means the icon has been assigned a place in a window or the desktop by the Finder, stored in the Desktop file.

Leave a Reply to Adam Rosen Cancel reply

Your email address will not be published. Required fields are marked *