2

I have a directory, ~/Downloads, which has accidentally become associated with Terminal.app. I would like to remove the association so that the directory can be used with Finder.app again. Thus far, I have investigated extended attributes with xattr, but this isn't the right method to remove associations. How does one fix a problem like this? Please see the illustration below.

This is macOS 10.13.6.

It appears to have been done by copying a Keynote "file" to the directory.

cp -rp file.key/ ~/Downloads/

enter image description here

4

Looks like you've set the bundle bit on your folder somehow (visible in the Info window: Kind: Package).
Some applications prefer (or create) a package instead of a folder, which can be double clicked to open a whole library folder in an application (iPhoto for example) and maybe to make it harder for the user to mess with its content(?).
To remove the bit run the following command in Terminal (/Applications/Utilities/Terminal.app, or search in Spotlight):

SetFile -a b ~/Downloads

SetFile is part of the command line tools. Without the command line tools installed, a popup should ask you if you want to download them. Allow this and try again.

|improve this answer|||||
  • 1
    Bingo! Thank you. After reading the help for SetFile, I still would not have been able to deduce myself what to do even if I knew what I had done and which program could undo it. Do you happen to know of a good reference for the SetFile command? Evidently, -a b is merely a toggle switch. – Christopher Jul 11 '18 at 12:19
  • 1
    Sorry, apart from man SetFile your internet search is probably just as good as mine. It's deprecated and I can't even find the legacy documentation at the Apple developer site. – Redarm Jul 11 '18 at 12:30
  • 2
    Ah! Thank you again. Even though /usr/bin/setfile and /usr/bin/SetFile exist as regular executable files, not links, the man page is case sensitive - not man setfile, but man SetFile - which explains SetFile flawlessly. The program's help is a bit cryptic. – Christopher Jul 11 '18 at 12:41

You must log in to answer this question.

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