Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Quite simply, the option in Finder prefs to show all filename extensions is checked, but sometimes when I save something, e.g. a text file, and don't explicitly specify a filename in the save dialog, the file appears in the finder without an extension.

Yet Finder recognizes its type as SimpleText in list view, its icon becomes a preview of the document with the footer "TXT," and Quicklook displays the file correctly.

I have also tried unchecking and rechecking that box after creating the file; the extension does not appear after recheck or even relaunch of Finder. If there's nothing that can be done, that's a satisfactory answer--typing .txt is not a big deal – but I'm just curious! OS X 10.6.7.

share|improve this question
up vote 1 down vote accepted

It does. If you're sceptical of a file's full name, you can view it by opening terminal, using cd to change to the directory it's in, and then using ls to show the full names of all files in the directory.

What you could be seeing is Finder and Quick Look viewing extra metadata stored in the filesystem. The option in Finder does work though, but you can always use Terminal to get the definitive name of the file in question.

share|improve this answer
The traditional "Finder Info" metadata, including the type/creator codes, are stored in extended attributes attached to the file's record in the filesystem, not the resource fork. – Spiff Jun 10 '11 at 5:53
Contrary to popular misconception, file type and creator code information isn't stored in the resource fork, but in the HFS+ metadata, specifically the Catalog File. – NSGod Jun 11 '11 at 19:39

In this case, that file really has no extension.

You can double-check in Terminal by opening it and dragging&dropping the file from Finder onto the Terminal window, where its full path including file extension will appear.

Mac OS X has some methods of file type detection that work around missing file extensions, e.g. using extended attributes.

share|improve this answer

I'm going to guess you're a Windows user who's started using OS X. OS X doesn't have to rely upon a file's extension to recognize file types as Windows does.

Quoting Wikipedia (

On Mac OS X, the filetype can come from the type code, stored in file's metadata, or the filename.

share|improve this answer
Type codes are no longer in use. GetFileInfo usually shows them as type: "\0\0\0\0". The uniform type identifiers shown by mdls are based on the filename extension. – user495470 Aug 16 '12 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .