
Nov 25, '08 07:30:04AM • Contributed by: Anonymous
What I wanted to do was select any folder, press a keyboard combo, and have a new folder created inside that currently-selected folder. Similarly, selecting a file and hitting a shortcut would create a new folder where that file is located. So I set to work with AppleScript; here's the code (Please note: I'm no uber-scripter, so there may be simpler ways of doing this.) There does seem to be a bug where Finder will not select the newly created folder. Also, to make this work via the keyboard, you'll want to use something like Spark to hook up a keyboard shortcut to this script.
[robg adds: I tested this using Butler, and it worked as described. This much older hint explained how to create a new file in the currently-selected folder via AppleScript.]