2

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?

0

1 Answer 1

2

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.

3
  • That is nice. Can you also explain how it happened in first place?
    – Ruskes
    Commented Sep 21, 2014 at 22:48
  • I don't know how it happened.
    – Jim
    Commented Sep 22, 2014 at 15:11
  • For anyone else that faces this issue, as in my case, I had what I thought was a .webloc file, but apparently, I had some sort of URL saved as a file (in the Finder) that was something other than a .webloc (or textClipping?). So I just went to the URL and created a .webloc. I needed the extension for a script I was writing to work.
    – hepcat72
    Commented May 9, 2020 at 16:38

You must log in to answer this question.

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