You no doubt know that you can copy a file or folder by selecting it in the Finder, hitting Command-C, then switching to a different folder in the Finder and hitting Command-V. But I recently discovered that Mac OS X is pretty smart when it comes to copying and pasting between the Finder and other apps. (I think a lot of these features are new in Leopard; I remember Tiger being a lot “dumber” in this regard.)
For example, select a file or folder in a Finder window and copy it with Command-C. Now switch to a Terminal window and hit Command-V. The path to the item is pasted into the window. You can also do this with multiple Finder items by selecting them before copying and pasting; all the paths appear on one line in the Terminal window, separated by spaces. Perfect for passing them as arguments to a shell command:
Paste the same items into a plain text editor, such as TextEdit or TextWrangler, or a note in iCal, and you get a list of the filenames without the full paths. (To get the full paths across, try dragging instead of copying/pasting.) Paste some Finder items into an iWork document, and it inserts the contents of any readable files – such as text and image files – into the document. Paste them into a mail message in Mail, and Mail attaches them to the message.
It doesn’t always get it right, though. Paste a file into Safari, and you’d expect the URL of the file to appear in the Location bar, ready to browse the file. Instead, it just pastes the filename. And if you copy and paste from the Finder into a Stickies note, it inserts the icons into the note. Just the icons. You can’t do anything with them apart from admire their prettiness. What’s all that about?!
Despite the odd quirk, copying and pasting from the Finder to other apps generally does the right thing. Quite impressive, and something that Windows doesn’t do very well (last time I checked).