In the Finder, there are numerous ways to duplicate a given file: either copy and paste the file to the same place, Option-drag the file to the same folder, or Control-click on the file select Duplicate from the contextual menu (or just press Command-D in the Finder).
Interestingly, the behavior of renaming the copied file for these three commands differs slightly. While duplicating or copying and pasting appends copy to the end of the filename (unless it already ends in copy, in which case it begins to enumerate) option-dragging the file to the same folder results in a slightly more useful naming system.
If the original file does not end in an integer, the new filename will be appended with the number 2 instead of copy. If the original ends in an integer, however, Finder does something quite useful -- instead of appending 2 to the end of the file, it recognizes the integer and adds one to the value.
For example, Report.doc will be renamed to Report 2.doc, but Report Number 67.doc will be conveniently renamed to Report Number 68.doc.
[robg adds: This is marked 10.5 only as I believe this behavior was new in OS X 10.5.]
The two delay lines may need adjustment for different systems; experiment to find what works for you. Once you have the script working, use something like Fastscripts, QuickSilver, Proxi, QuicKeys, etc. to assign it a keyboard shortcut for fast activation. This should work in either Tiger or Leopard.
[robg adds: This worked for me as described on my Mac Pro (no editing of the delays was required).]
The following AppleScript traverses the currently-selected folder in the Finder, moves the contents of all subfolders of that folder up to the top level, then moves the (now empty) subfolders to the trash.
[robg adds: Copy and paste the above into Script Editor, then switch to the Finder, select a folder, switch back to Script Editor, and press Run. Because this script is non-reversible, I strongly recommend first using it on a non-critical test folder -- a duplicate of the folder you intend to flatten, for instance. That's how I tested it, and it worked as described (at least in 10.5; I don't know if it will run in 10.4). If this is something you do often, you could save the script to your user's Library » Scripts » Applications » Finder folder, where it'd be available from the Scripts entry in the menu bar.]
This hint was inspired by a study that found red wallpaper conducive to detail-oriented work, while blue wallpaper works better for creative work. Based on that, I wrote a simple AppleScript to display a dialog that allows the user to choose between working environments. The script then sets the desktop picture based on the user's selection.
Note that this hint assumes you've already created the new solid colors (very dark gray, very dark blue, and very dark red) as explained in this previous hint. Once you have those colors (or others, if you prefer; just change the script as necessary), create the following AppleScript:
[robg adds: I tested this, and it works as described. If you want to use more colors, you need to change both the buttonList and colorList lines so that they remain in sync. The list of colors in colorList must exactly match the colors' filenames as seen in the Finder.]
There are many published methods to put files in named folders based on date created or modified, but this one puts them in corresponding folders based on the date the file was added to the folder, similar to the sorting option for stacks in the Dock -- I use this to organize my Downloads folder.
The following AppleScript works by exploiting the HFS+ inode table, and retrieves the date which the file's name was added to the directory tree, regardless of when it was previously modified or created in other locations.
It could probably use some optimization, so feel free to make suggestions if you're an AppleScript geek!
[robg adds: This works as described, at least on the folders I tested it with. Note there's no going back, of course, so if you run the script, you'd have to manually restore the flat folder structure if you change your mind. A couple of other hints in this category include organizing the Downloads folder by download date (which changes the files' modifications times to re-sort them) and using Hazel to sort items in folders (among its other features).]
Note: This hint was lost when the site was hacked on April 23rd. I've reposted it, and the comment thread, as best as I could. --robg
In the Finder's list view, if you sort by Kind, folders are lumped together in the middle of the list. If you'd rather see all the folders at the beginning of the list, here's how to change the sort order.
In the Finder, navigate to /System » Library » CoreServices » Finder.app » Contents » Resources » English.lproj (or the folder for your language). In that folder, open the InfoPlist.strings file in a pure text editor.
Inside the file, find this section and entry:
/* General kind strings */
"Folder" = "Folder";
Leave the first line alone, but change the second to read:
"Folder" = " Folder";
Note that I have added only a single space before Folder. Save the file after making the change, and then restart OS X. To test your change, open a Finder window and view by Kind (either via View » Show View Options, or by pressing Command-2, then clicking on the Kind column header).
robg cautions: As noted in the comments, this hint will break OS X 10.5's code signing for the Finder. In theory, this will have some bad consequences, as you'll no longer be able to access the keychain when using the Finder. Proceed at your own risk; if you undo the edit, at least based on my testing, things will return to normal (code signing checks will pass).
[robg adds: This is an update to this much older hint, which required modifying a system-wide framework. Note that restarting isn't required; just restart the Finder via Terminal, Activity Monitor, or Option-click-and-hold its Dock icon.
If you want folders at the end of the list, instead of the beginning, you'll have to use one of a few special characters:
µ (mu): Option-M
π (pi): Option-P
Ω (omega): Option-Z
I also did a bit of experimenting with the Edit » Special Characters palette. Most any Greek letter (European Scripts » Greek in the All Character view) will force a name to the end of the list, as will some Cyrillic characters. But that's about it; pretty much everything else I tested forced the names to the front of the list.]
Today I noticed that you can force Spaces to move windows to another Space while retaining their relative position on the screen. To do so, open the Spaces overview (F8 by default), and hold the Command key while dragging a window to another Space.
I found this by accident and don't think it's that useful, but perhaps you will...
[robg adds: This was mentioned in a comment to this hint, but I thought it worth sharing as a real hint. In testing it, the behavior varies between programs with one window (iCal) and those with many windows (iChat, Safari, whatever). If a program has but one window, then Command (or Shift or Control) will move it while retaining its location. If a program has multiple windows, any of those keys will move all of that program's windows while retaining their positions. I couldn't, in fact, find a way to move all windows of a program to another Space without retaining their positions -- I had to manually move them within the new Space (again, while holding any of those keys so that all windows moved) to change their position.]
This is a simple AppleScript for the Finder which moves the currently selected items into a newly-created folder, and puts the new folder into rename mode. I use this to quickly sort my files into properly-named folders.
If you are like me, you have a lot of entries in the Places section of the sidebar in Leopard's Finder. What if you want a Smart Folder that aggregates your favorite/recent places (or provides any Smart Folder functionality), but you don't want to have to scroll down to the Search For section of the sidebar? In other words, you'd like to place your Smart Folders in the Places section of the sidebar.
By default, Apple disables moving Smart Folders to the Places category of the sidebar. So how do you get around this? Easily.
Take any saved search on the sidebar, Control-click on it and select Open Enclosing Folder from the pop-up menu. Then select your search and choose File » Make Alias, and drag the alias to your sidebar. Done!
[robg adds: I think this can be further simplified -- once the enclosing folder is visible, you can drag any of the visible Smart Folders directly to the Places section of the sidebar; no alias is required (at least not on my 10.5.6 machine it's not).]
It's trivial, but convenient: create a quick and dirty 'contact sheet' of images using Quick Look, three simple keyboard shortcuts, and one mouse-click:
Open the folder containing the set of image files.
Press Command-A, Command-Option-Y, click the Index Sheet button, then press Command-Shift-3.
Just that easily, and you've made a contact sheet from the Quick Look display -- you'll find it on your Desktop, in a file named Picture 1. With a very little bit of coding, you can turn this into a simple script, too.