Working with Aliases


As described earlier, aliases are shortcut files that when opened point to and open another file. In some ways, aliases act just like the files or folders they represent. In other ways, aliases may act like the independent files they actually are. Accordingly, you use many of the same techniques when working with aliases that you do when working with files and folders, although some differences do exist. In this section, we cover many techniques for working with aliases.

Making an alias

You can make an alias for files, folders, or disks. You can make more than one alias for the same original item and put each alias in a different location.

Making an alias is a simple procedure. Do one of the following:

  • Select an item and then choose File Make Alias or press z-L. This will create the alias in the same folder as the original item.

  • Control-click an item to pop up its contextual menu and choose Make Alias from there. This will create the alias in the same folder as the original item.

  • Press z-Option while dragging an item to the place where you want an alias of it. You can start pressing z-Option at any time while dragging, but you must hold down the keys while you release the mouse button to make an alias. While you press z-Option, the pointer changes, and acquires a small right-pointing arrow in addition to its normal large left-pointing arrow. This method allows you to simultaneously create an alias and place it in the desired location, saving you the step of moving the alias required by the previous two methods.

An alias has the same icon as the original item, except that the icon has a small curved arrow superimposed to indicate it is an alias. The alias also inherits the name of the original item. If the alias is created in the same folder as the original, the Finder adds the word alias to the alias name. The Finder also adds a number to the name as needed (to prevent a new alias from having the same name as another alias in the same folder). The word alias is not added when you make an alias by z-dragging the original item to another folder. Figure 4-22 illustrates the subtle differences between an alias and an original.

click to expand
Figure 4-22: Be aware that the alias of an item (bottom) is primarily differentiated from the original (top) by the small arrow in the corner (always present), rather than by the word alias which can be removed.

Tip

The small icons in Finder window title bars can also be used to make aliases. Just press z-Option while dragging the small icon to make an alias of the original folder.

Renaming an alias

Immediately after you create an alias, its name is selected for editing. You can change the name by typing a replacement or by using the other name-editing techniques described in Chapter 3. For example, you may want to remove the word alias from an alias name so the alias has the same name as its original item. An alias can have exactly the same name as its original item as long as they are in different folders. If an alias is in the same folder as its original item, move the alias somewhere else before you try to make the alias’s name the same as the original item’s name. Of course, an alias and its original can be in the same folder if their names are very similar but not identical.

Dragging items to an alias

Aliases function like their original item when items are dragged to them. For example, if you drag an item to an alias of a folder, Mac OS X resolves the alias and the Finder puts the dragged item into the original folder. Dragging a document to an alias of an application will cause the original application to attempt to open the document. Please note that dragging an alias to a folder or application just moves the alias or causes the application to attempt to interact with the alias.

Moving, copying, and deleting an alias

After you make an alias, you can manipulate it as you would any other item. You can move it, copy it, and delete it.

  • If you move an alias to a different folder, its original item is not affected. Only the alias is moved, and the alias still knows where to find its original item.

  • If you make copies of an alias, all the copies of the alias refer to the same original item.

  • If you delete an alias, its original item is not deleted.

Finding an original item

You can find an alias’s original item by choosing File Show Original (z-R). The Show Original command displays a Finder window that contains the original item, scrolls the original item into view, and selects it. Alternately, Control-clicking on an alias (bringing up its contextual menu) also offers an option to Show Original.

Fixing broken aliases

If you try to show an alias’s original item but the original item has been deleted or moved to a disk that has been ejected or removed, the Finder tells you that the original item can’t be found. Figure 4-23 shows the alert that you see in the Finder if Mac OS X can’t resolve an alias.

click to expand
Figure 4-23: The Finder displays an alert when it can’t find an alias’s original item.

Note

You may not get the alert shown in Figure 4-23 if you try to use a broken alias in an application other than the Finder. In certain Mac OS X applications, the alert you see may simply state the item could not be opened.

The Finder’s alert has an OK button, a Delete Alias button, and a Fix Alias button. Clicking OK will cancel the attempt to use the alias for now. Clicking Delete Alias moves the alias to the Trash. Clicking Fix Alias displays a Fix Alias dialog in which you can choose a new original for the alias. This dialog is like the column view of a Finder window. In this dialog, select a file or folder to be the new original item and click the Choose button. (Of course, you can select the old original item to be the new original item, if you know where it is.) Figure 4-24 shows the Fix Alias dialog in which you choose a new alias.

click to expand
Figure 4-24: Choose a new original for a broken alias.

Selecting a new original for an alias

Instead of throwing away an obsolete or broken alias and making a new one, you can recycle the old alias by assigning it a new original item. Frankly, creating a new alias and discarding an old one is easier than assigning the old one a new original item, and recycling old aliases certainly has no positive environmental impact. Nevertheless, you may have an alias on which you have lavished great attention (having applied a fancy custom icon, elaborate comments, or a clever name) and repurposing such a work of art may be easier than recreating it. Perhaps you have an alias in your Favorites folder that refers to a project folder buried inside your Documents folder, and you want to keep using the same alias when you move on to a new project folder. It is also possible that when fixing a broken alias you selected the wrong original item, and rather than recreate the alias, you can just select a different item. Whatever your reason for taking advantage of the power that the Info window grants you to redirect an alias, here is the procedure for doing the deed:

  1. Select the alias to which you want to assign a new original item.

  2. Open the Get Info window. A Select New Original button appears in the General section of the Info window. This button is disabled if the alias is locked or you don’t have Write privileges for the alias.

  3. Click the Select New Original button. The Fix Alias dialog box appears. This dialog box is like the column view of a Finder window and is shown previously in Figure 4-24.

  4. In the Fix Alias dialog, select a file or folder to be the new original item and click the Choose button.




Mac OS X Bible, Panther Edition
Mac OS X Bible, Panther Edition
ISBN: 0764543997
EAN: 2147483647
Year: 2003
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net