Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 down vote accepted

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/foo.bar" as alias) to true

You can run this from the command line using

osascript -e command
share|improve this answer

Your Answer

 
discard

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.