A-to-Z Index

Computing Homepage

Information Technology Help Desk

Mon -Thu: 8:00am -9:00 pm
Friday: 8:00am - 5:00pm
Saturday: Closed
Sunday: 3:00pm - 9:00pm

(when classes are in session)

Exceptions for the year


Macintosh

OS X Filenames

What you can and cannot do with filenames in Mac OS X:

Can't rename a file in the Finder. Normally, if you click the name of a file in the Finder (or simply click the file's icon and press Return), the name is shifted to an editable text box that allows you to change the files name. If this text box does not appear, either you do not have the permissions required to make such a change, or the file is locked.

Long file names. Mac OS 9 has a 31-character limit for filenames. In Mac OS X, a filename can be as long as 256 characters and span several lines.

Still, a couple of glitches are possible:

  1. In many applications (especially non-cocoa ones), the Open and Save dialogs show only the first 31 characters of a filename. If you simply open and save a document that already has a longer name, the full name is preserved even though you don't see it in the Open and Save dialogs. If you use the Save As command to save a file under a new name, however, you will be limited to 31 characters (although you can add extra characters in the Finder later).
  2. Some applications may truncate a long name to 31 characters when saving a file. Some compression utilities may do this when compressing a file or folder.

Do not use a forward slash (/) in filenames. The forward slash (/) is used in Unix as a separator for directories. Thus, Library/Fonts means the Fonts folder inside the Library folder. Adding the forward slash character to the name of a file can confuse Unix into thinking that the slash refers to a subdirectory. It can also confuse the Finder. For example, if you use the Finder's "Go to the folder" command to go to a folder with a forward slash in its name, the command will not succeed. The solution is to avoid using the forward slash character in filenames.

Do not use a colon (:) in filenames. IF you try to use a colon in a filename, the colon may be converted to a hyphen. More likely, you will get an error message stating, "The name cannot be used. Try another name with fewer characters or no punctuation marks." This is a carryover from a naming restriction in Mac OS 9, where the colon was the separator for directories (much as the forward slash is used in Mac OS X).

Do not use a period (.) at the start of a filename. A dot (.) at the start of a filename indicates that the file should be invisible, so the OS typically blocks you from naming a file in this way. Unless you are deliberately attempting to create an invisible file, do not attempt to work around this block.

Other issues. Including a space in a filename is normally fine. However, if the file may be used on another platform (such as Windows or Unix), a space in a name may be misinterpreted. Thus, try to avoid spaces in names if you intend to export the file to another platform.

Finally, nonalphanumeric characters in names may cause problems. Apple's Knowledge Base lists most of these instances. For example, one articles states, "Apple is unable to make prints of photos that have a question mark (?) in their filename."