Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to set make a file into a Stationery pad from the command line?

You can do it by clicking "Get info" on a file and checking the box, but I would like to do it without clicking.

Get Info dialog

An AppleScript solution would be useful also, but GUI scripting is off limits.

share|improve this question
up vote 2 down vote accepted

The SetFile utility is provided with Xcode, which Apple distributes at no cost. Once you have installed Xcode, you can issue the command

SetFile -a T /path/to/
share|improve this answer

After failing to find a non-AppleScript way to do this, I bit the bullet.

The AppleScript:

 tell application "Finder" to set stationery of ¬
   (POSIX file "/path/to/" as alias) to true

You can run this from the command line using

osascript -e command
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.