Every document, program, folder, and disk on your Mac is represented by an icon: a colorful little picture that you can move, copy, or double-click to open. In OS X, icons look more like photos than cartoons, and you can scale them to practically any size.
An OS X icon’s name can have up to 255 letters and spaces. If you’re accustomed to the 31-character or even eight-character limits of older computers, that’s quite a luxurious ceiling.
If you’re used to Windows, you may be delighted to discover that in OS X, you can name your files using letters, numbers, punctuation—in fact, any symbol except the colon (:), which the Mac uses behind the scenes for its own folder-hierarchy designation purposes. And you can’t use a period to begin a file’s name.
To rename a file, click its name or icon (to highlight it) and then press Return. (Or, if you have time to kill, click once on the name, wait a moment, and then click a second time. Or—new in El Capitan—right-click the icon; from the shortcut menu, choose Rename.)
In any case, a rectangle appears around the name (Figure 2-2). At this point, the existing name is highlighted; just begin typing to replace it. If you type a very long name, the rectangle grows vertically to accommodate new lines of text.
If you simply want to add letters to the beginning or end of the file’s existing name, press the or
key after pressing Return. The insertion point jumps to the beginning or end of the file name.
Figure 2-2. Click an icon’s name (top left) to produce the renaming rectangle (top right), in which you can edit the file’s name. OS X is kind enough to highlight only the existing name, and not the suffix (like .jpg or .doc). Now begin typing to replace the existing name (bottom left). When you’re finished typing, press Return or Tab to seal the deal, or just click somewhere else.
You can give more than one file or folder the same name, as long as they’re not in the same folder. For example, you can have as many files named “Chocolate Cake Recipe” as you like, provided each is in a different folder. And, of course, files called Recipe.doc and Recipe.xls can coexist in a folder, too.
As you edit a file’s name, remember that you can use the Cut, Copy, and Paste commands in the Edit menu to move selected bits of text around, just as though you were word processing. The Paste command can be useful when, for instance, you’re renaming many icons in sequence (Quarterly Estimate 1, Quarterly Estimate 2…).
And now, a few tips about renaming icons:
When the Finder sorts files, a space is considered alphabetically before the letter A. To force a particular file or folder to appear at the top of a list view window, insert a space (or an underscore) before its name.
Older operating systems sort files so that the numbers 10 and 100 come before 2, the numbers 30 and 300 come before 4, and so on. You wind up with alphabetically sorted files like this: “1. Big Day,” “10. Long Song,” “2. Floppy Hat,” “20. Dog Bone,” “3. Weird Sort,” and so on. Generations of computer owners have learned to put zeros in front of their single-digit numbers just to make the sorting look right.
In OS X, though, you get exactly the numerical list you’d hope for: “1. Big Day,” “2. Floppy Hat,” “3. Weird Sort,” “10. Long Song,” and “20. Dog Bone.”
In addition to letters and numbers, OS X also assigns punctuation marks an “alphabetical order,” which is this: ` (the accent mark above the Tab key), ^, _, -, space, –, —, comma, semicolon, !, ?, ‘, “, (, ), [, ], {, }, @, *, /, &, #, %, +, <, =, ≠, >, |, ~, and $.
Numbers come after punctuation; letters come next; and bringing up the rear are these characters: μ (Option-M); π (Option-P);Ω (Option-Z), and (Shift-Option-K).
It’s one of OS X’s most useful features, and hardly anyone even knows it exists: You can rename a whole windowful of files at once—numbering them, correcting spelling in dozens of files at once, deleting a certain phrase from their names, and so on.
To perform this kind of simultaneous name surgery, begin by selecting all the files whose names you want to edit, as described in the following section. Then right-click (or two-finger click) any one of them; from the shortcut menu, choose “Rename 12 Items” (or whatever the number is).
Now you get the dialog box shown in Figure 2-3. Its pop-up menu offers three ways to rename the icons en masse:
Replace Text. This, ladies and gents, is search-and-replace for text in your files’ names. Fill in the “Find” and “Replace with” boxes; click Rename. Example: Change “Mom’s Recipes—Fish,” “Mom’s Recipes—Desserts”…into “My Own Recipes—Fish,” “My Own Recipes—Desserts”…
Add Text tacks some text onto the files’ original names; use the second pop-up menu to specify where (beginning or end). Example: Change “Mom’s Recipes—Fish,” “Mom’s Recipes—Desserts”… into “My Mom’s Recipes—Fish,” “My Mom’s Recipes—Desserts”…
Format is complicated but powerful. It completely obliterates whatever the files are called now; instead, it gives them all the same base name (like “Recipes”), differentiating them with a number or the date, either before or after their base names.
Suppose, for example, that you type “Recipes” into the Custom Format box. That’s the base name.
Now, if you choose “Name and Index” from the second pop-up menu and click Rename, you’ll get files named “Recipes 1,” “Recipes 2,” and so on. You can specify that you want the number (what OS X calls the index) either before or after the base name, and what number should begin the sequence. “Name and Counter” is the same, except that each number is padded out to five digits (“Recipes 00001,” “Recipes 00002”…).
Finally, “Name and Date” adds the current time and date to the end of every file’s name, in the form “2016-3-19 at 20.20.05 PM” (which means March 19, 2016, at 8:20 p.m.). Of course, that means every selected file will have exactly the same name (“Recipes 2016-3-19 at 20.20.05 PM”). The Mac will give you an instant error message, therefore, unless the original files are in different folders or have different file name extensions (like .jpg, .doc, and so on).
The batch-renaming feature is delicious and awesome, but there is some fine print. Don’t search-and-replace the file name extensions (like .jpg or .doc); you might not be able to open the files afterward. Don’t rename system files or your Home folder.
And use a shareware program like A Better Finder Rename if you want even more power and flexibility in mass-renaming files.
Figure 2-3. OS X offers a range of sophisticated batch-renaming options. There’s search and replace within file names; there’s “add the same text to the beginning or end of the file names”; and there’s the option shown here, Format. Here you completely replace the existing file names with new, consecutively numbered names, available in various creative styles.