1

I have a folder containing a bunch of jpeg files and currently all of the filename extensions (.jpg) are hidden. How can I unhide all the extensions in this folder?

When I do a "Get Info" on any individual file, I can see that the "Hide extension" checkbox is checked but it's grayed out (i.e. disabled) so I can't change it. I've gone to Finder's Advanced Preferences and checked "Show all filename extensions" but that hasn't made a difference. Also, I do have read and write privileges on the files. How do I do this?

1

After doing some research I found the answer. You have to run this command:

SetFile -a e <filename>

In effect, this says "Set the file extension attribute (-a e) so that the extension is not hidden. If the extension were not hidden and you wanted to hide it, you would substitute "E" for "e".

To see all of a file's attributes, run this command:

GetFileInfo <filename>

A description of all the attributes can be found here.

  • That is nice. Can you also explain how it happened in first place? – Ruskes Sep 21 '14 at 22:48
  • I don't know how it happened. – Ray Sep 22 '14 at 15:11

You must log in to answer this question.

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