1

How can I achieve the equivalent of setfile -type 'sbDB' ~/myfile on OS X 10.7, which no longer seems to support the setfile command?

I happen to know that the equivalent of setfile -a V ~/myfile is now chflags hidden ~/myfile. But how do I do I set a custom type like for instance sbDB - when I try chflags sbDB ~/myfile it says "invalid flag".

2
  • What is the expected outcome of the 'setfile' command? When I run it on an empty file with no extension (created via touch) there is no output, but Finder shows the file as a 'Sidebar DropBox folder icon" which makes me think that setfile is working on Lion (10.7.1) for me.
    – TJ Luoma
    Sep 28, 2011 at 4:18
  • @TJ, it doesn't for me - i simply get -bash: setfile: command not found Sep 29, 2011 at 19:04

3 Answers 3

1

Install Xcode.

I am (99.999%) sure that SetFile is part of that (I wish it wasn't).

http://itunes.apple.com/us/app/xcode/id448457090?mt=12

1
  • I'll accept this answer, but I believe there should be a way around this, without having to install Xcode. Nov 1, 2011 at 17:51
3

You can just download the latest CLI tools for XCode here. Select the package for your OS X version. I just downloaded the November Mountain Lion XCode tools, and app setflag is included.

2

Just to freshen up the information here, having just grappled with this: As of OS X 10.8.2 SetFile is still no longer included in a regular base install (to the best of my knowledge). I have read that as of 10.4.X it could have been found under /Library/Receipts.
Source: MacRumors

It also now seems that xcode no longer installs its resources into the root directory /Developer/ but instead keeps all its resources within itself, i.e. with in the package contents (right-click → Show Package Contents). I can't give the path at the moment as I'm not on a 10.8 box, but it didn't take me long to find it once I was in there.

If there is a method that supersedes SetFile which doesn't require dependances outside of a base install, I'd sure like to know about it!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .