Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
Probably a simple setting I'm not seeing, but is there a way to stop the Finder from automatically adding file extensions to saved files? E.g., if I save a photo off the internet and add a name, the .jpg extension always gets added. I want this not to happen and not simply for file extensions not to be shown. Possible? Thanks.
 
  • Like
Reactions: iPadCary

fisherking

macrumors G4
Jul 16, 2010
11,250
5,559
ny somewhere
try Finder>preferences>advanced; make sure 'show all file extensions' is unchecked (if it's already unchecked, try checking/unchecking it)...
 

usagora

macrumors 601
Nov 17, 2017
4,869
4,456
Finder > Preferences > Advanced > un-check "Show all filename extensions"
 

HDFan

Contributor
Jun 30, 2007
7,257
3,316
Probably a simple setting I'm not seeing, but is there a way to stop the Finder from automatically adding file extensions to saved files?

Seeing file extensions is very helpful. Get used to it. Without a visible extension (.jpg, .psd, .gif, etc) there’s no way to tell at a glance what the file is.

It is more than just helpful. Things just won't work without the extension. Finder can't show thumbnails of pictures, excel can't find all of your worksheets, programs won't load if you open the file, etc.

Why don't you want the files created without the extension?
 
  • Like
Reactions: T'hain Esh Kelch

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
Finder > Preferences > Advanced > un-check "Show all filename extensions"
try Finder>preferences>advanced; make sure 'show all file extensions' is unchecked (if it's already unchecked, try checking/unchecking it)...

Thanks for the replies. Knew about this one and had tried it, but no luck.

The main offender is Safari. Anything saved via Safari ends up with an unwanted file extension in the file name, but, e.g., anything created via the "Screenshot" app doesn't have the file extension in the file name.
 

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
Seeing file extensions is very helpful. Get used to it. Without a visible extension (.jpg, .psd, .gif, etc) there’s no way to tell at a glance what the file is.

Well, I lived without file extensions in the file name until Monterey. Before Monterey, it was definitely possible to save files without the extension appearing in the file name. Somewhere, a preference was deleted or isn't working.

It is more than just helpful. Things just won't work without the extension. Finder can't show thumbnails of pictures, excel can't find all of your worksheets, programs won't load if you open the file, etc.

Why don't you want the files created without the extension?

The OS knows what type of file it is without it being in the file name.

The file extension in the file name is totally unnecessary and requires editing/deleting after, e.g., a saved photo is imported into Photos.
 
  • Like
Reactions: stevec618

usagora

macrumors 601
Nov 17, 2017
4,869
4,456
Thanks for the replies. Knew about this one and had tried it, but no luck.

The main offender is Safari. Anything saved via Safari ends up with an unwanted file extension in the file name, but, e.g., anything created via the "Screenshot" app doesn't have the file extension in the file name.

I like to see all file extensions, so obviously this isn't an issue for me. However, in the interest of trying to find an answer for you, I've been experimenting with the setting. Strangely, I noticed that even when I UNchecked the "Show all filename extensions" option, none of my file extensions disappeared. Then I discovered that individual file settings override that global setting, and for some reason, apparently every file on my computer does NOT have "Hide extension" checked when I "get info" for the file.

I also discovered that when you're going to save a file in an app, on the Save As dialogue, if you click the view options dropdown menu, there is an option to "Hide extension" for the saved file. The app remembers this option the next time you go to save a new file.

Screen Shot 2022-05-06 at 11.55.47 PM.png


However, I don't see this option in Safari's Save-as dialogue. I DID see it in MS Office apps and got it to work. I did see it in Chrome as well, but for some reason it doesn't work there. It seems to work when you check "Hide Extension" because the filename immediately loses its extension in the field where the editable filename appears, however the saved file in Finder shows the extension. So it seems really inconsistent/buggy. IMO, the global setting (under Finder > Preferences > Advanced) should override EVERYTHING, but it doesn't for some odd reason.
 

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
The OS knows what type of file it is without it being in the file name.
No, that isn't right. If you create a new a jpeg and remove its extension, the default app for opening it is TextEdit.

It really is a bad thing to remove the file extension - some things will not work as you want/expect.

It is fine to hide the extension from Finder - this is a property of the file. There is not, and has never been to the best of my knowledge, a way to tell macOS to always create files with extension hidden.

For some tricks as to how to tell lots of files to hide their extension try these https://apple.stackexchange.com/que...xtensions-in-subdirectories-of-a-given-folder and https://discussions.apple.com/thread/250660690

Note that even when a file is marked hide its extension, the extension may be shown in other applications - for example the `ls` command in Terminal.
 

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
I like to see all file extensions, so obviously this isn't an issue for me. However, in the interest of trying to find an answer for you, I've been experimenting with the setting. Strangely, I noticed that even when I UNchecked the "Show all filename extensions" option, none of my file extensions disappeared. Then I discovered that individual file settings override that global setting, and for some reason, apparently every file on my computer does NOT have "Hide extension" checked when I "get info" for the file.

I also discovered that when you're going to save a file in an app, on the Save As dialogue, if you click the view options dropdown menu, there is an option to "Hide extension" for the saved file. The app remembers this option the next time you go to save a new file.

View attachment 2001837

However, I don't see this option in Safari's Save-as dialogue. I DID see it in MS Office apps and got it to work. I did see it in Chrome as well, but for some reason it doesn't work there. It seems to work when you check "Hide Extension" because the filename immediately loses its extension in the field where the editable filename appears, however the saved file in Finder shows the extension. So it seems really inconsistent/buggy. IMO, the global setting (under Finder > Preferences > Advanced) should override EVERYTHING, but it doesn't for some odd reason.

Thanks for your time. Glad it's not just me. Something definitely changed in Monterey.
 

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
No, that isn't right. If you create a new a jpeg and remove its extension, the default app for opening it is TextEdit.

I've deleted the .jpg extension from hundreds of photos and have never had this problem. A saved JPG file will always open with Preview unless "Open With" is manually changed, just like with any other type of file.

There is not, and has never been to the best of my knowledge, a way to tell macOS to always create files with extension hidden.

There definitely was, until Monterey. The problem seems to be what was discussed above: Safari doesn't have the "hide extension" option in the Save dialog box. I had thought there was also a global option, but that's either not true or not working like it's supposed to. As the first replies suggested, there's a "hide extensions" option in the Finder Prefs' Advanced tab, but it doesn't seem to work right now.


Thanks. I'll check those out.
 
  • Like
Reactions: Renderdog

usagora

macrumors 601
Nov 17, 2017
4,869
4,456
That is a Finder setting - i.e. how Finder shows files. It is not about the underlying file system.

That's what I'm talking about - how they show up in Finder. For some reason, even with "Show all filename extensions" NOT checked in Finder preferences, every existing file still shows up with an extension in Finder and every newly created or downloaded file will default to show the extension anyway. For example, if I create a new TextEdit file and save it to my desktop as "test", it will show up as text.txt in Finder under ~/Desktop. So what's the point of the option? Doesn't seem to have any effect except to make the "Hide extension" option I screen-shotted in post 8 visible in Save-as dialogues (except even that doesn't show up and/or work in some apps, as I described).
 
  • Like
Reactions: jk73

headlessmike

macrumors 65816
May 16, 2017
1,424
2,814
I've deleted the .jpg extension from hundreds of photos and have never had this problem. A saved JPG file will always open with Preview unless "Open With" is manually changed, just like with any other type of file.
If you did that in Finder then you were never really deleting the extension. Finder just hid the extension when you "deleted" it. Actually deleting the extension, e.g., using the terminal, will render the file unusable. On my machines running Monterey it still behaves as it always has in this regard. But there might be some nuances in what you are trying to achieve that I am missing.

To make sure I did a test with a jpeg. Deleting the extension in finder just hid it from view, and apps like preview could still open the file like normal because under the surface nothing has changed (this is what I understand you want to happen). Deleting the extension altogether (creating a copy using the cp command line routine and skipping the extension on the output) resulted in a file that could not be opened by any app since they could not identify the type (forcing Preview to read the file resulted in an error). Re-adding the extension restored the functionality of the file.
 

cateye

macrumors 6502a
Oct 18, 2011
745
3,019
The classic Mac OS never needed them. This was one of the backward steps with OS X.

it did need them, in a way. Classic MacOS got around this by splitting files into data and resource forks, where the resource fork told the system what kind of file it was and which program should open it, and the data fork was the actual file and its information (this is a gross over-simplification, but it's the gist of it). A cross-platform world where no other operating system worked this way, plus the internet, essentially doomed a bespoke, fussy solution like this to the dustbin when it became difficult to insure the integrity of files transferred outside of MacOS.
 

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
For some reason, even with "Show all filename extensions" NOT checked in Finder preferences, every existing file still shows up with an extension in Finder and every newly created or downloaded file will default to show the extension anyway.
As the first replies suggested, there's a "hide extensions" option in the Finder Prefs' Advanced tab, but it doesn't seem to work right now.

I think you have misunderstood that check box - it easily done. It only has function in the positive sense.

Unchecking "Show all filename extensions" stops Finder from showing all filename extensions - it does not "hide all filename extensions". Checking it makes Finder show all extensions whether or not the file properties say to hide the extension.

There is no "Hide all filename extensions" checkbox.

In other words:
Hiding requires both a) the hidden setting on the file, AND b) the Finder checkbox clear. Showing can be either a) lack of file marked as hidden, OR b) Finder set to show all extensions (whatever the individual file setting).
 
Last edited:
  • Like
Reactions: jk73

usagora

macrumors 601
Nov 17, 2017
4,869
4,456
I think you have misunderstood that check box - it easily done. It only has function in the positive sense.

Unchecking "Show all filename extensions" stops Finder from showing all filename extensions - it does not "hide all filename extensions". Checking it makes Finder show all extensions whether or not the file properties say to hide the extension.

There is no "Hide all filename extensions" checkbox.

In other words:
Hiding requires both a) the hidden setting on the file, AND b) the Finder checkbox clear. Showing can be either a) lack of file marked as hidden, OR b) Finder set to show all extensions (whatever the individual file setting).

Ok, that makes sense, but I could've swore (along with the OP) that it used to behave as we're expecting it to. But maybe I'm confusing it with the Windows option "Hide extensions for known file types" which behaves that way.

To add to the confusion here, according to Apple, macOS HIDES extensions by default (at least "usually"). So why does this not seem to be the case in Monterey? Because even with the "Show all filename extensions" UN-checked, every file created/saved or downloaded seems to show its extension in Finder by default.

Screen Shot 2022-05-07 at 9.54.09 PM.png


 
  • Like
Reactions: jk73

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
Relief that the Apple Support page does agree with me here about displaying file extensions:
"If you select “Show all filename extensions,” all extensions are shown, even for files that have “Hide extension” selected. If you unselect “Show all filename extensions,” then file extensions are shown or hidden based on their individual “Hide extension” settings."

But:
To add to the confusion here, according to Apple, macOS HIDES extensions by default (at least "usually").
The main offender is Safari. Anything saved via Safari ends up with an unwanted file extension in the file name, but, e.g., anything created via the "Screenshot" app doesn't have the file extension in the file name.
Hmm, the "usually" is somewhat unclear. Maybe it should be "sometimes". I get two different behaviours from Safari:

If I "print" a web page to PDF, I get a PDF with extension hidden.
If I "save" a PDF from Safari, I get a PDF with extension not hidden.

Having dug a bit deeper, I agree that Safari is not part of the "usually".

I don't know if this is a new behaviour with a particular version of either Safari or macOS and, assuming it is, does it make any difference if it is a clean install of current macOS or an upgraded one (mine has been upgraded for over 2 and half years).

My summary is that:
1) Finder is behaving as documented with the hidden flag, but
2) Apps are inconsistent about creating files wth or without the hidden flag.


And though it didn't bother me (I had not taken notice of it!), I can well understand those like yourselves who are annoyed by the inconsistent behaviour. Maybe I am becoming annoyed too!!!

I will try and dig deeper....
 
  • Like
Reactions: jk73 and usagora

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
I also discovered that when you're going to save a file in an app, on the Save As dialogue, if you click the view options dropdown menu, there is an option to "Hide extension" for the saved file. The app remembers this option the next time you go to save a new file.

Screen Shot 2022-05-06 at 11.55.47 PM.png


However, I don't see this option in Safari's Save-as dialogue.
I have now discovered https://discussions.apple.com/thread/250107448 that this behaviour was new with Mojave. But, as you say, not in Safari which lost the old mechanism without taking on the new.

After being dragged kicking and screaming to recognise this, I am now convinced that this is a bug which has been present in Safari since Mojave.

There are a few document applications which have still not not been updated to use this dropdown though most have. I just tested BBEdit - fail, Smultron - pass, Typora - pass, PDFPen - pass, Preview - pass. And you have already has success with MS Office.
 

gilby101

macrumors 68030
Mar 17, 2010
2,921
1,616
Tasmania
Following on from your annoyances and discoveries (to which I agree) I have submitted Apple Feedback FB10011828 regarding the Save As... dialog in Safari:

"For most apps, the “Save As…” dialog includes the ability to set or not set the “Hide Extension” flag for the file being saved. See attachment 1 for Text Edit’s “Save As…” which has the expected drop down to enable or clear the Hide Extension. Setting or clearing this flag remains sticky for future saves until there is a need to change it.

For Safari, the “Save As…” dialog does NOT include the ability to set or not set the “Hide Extension” flag for the file being saved. See attachment 2 where the drop down does NOT have the item which enables or clears the Hide Extension. In practice, the file is always saved with the Hide Extension flag off.

Safari should behave like Text Edit and does not. Most 3rd-party apps (there are some exceptions) have been updated to use this method of setting the Hide Extension flag. I believe this was introduced with Mojave.

This misbehaviour is certainly present in Safari for macOS 12.4 betas and 12.3.1. I suspect it has been present since Mojave, but have not tested that.

References to this issue (which you can ignore):
https://forums.macrumors.com/thread...tomatically-being-added-to-file-name.2344035/ As is the nature of forums, the thread is somewhat confused - but it does highlight that this is an issue for others.
https://discussions.apple.com/thread/250107448 where the change in behaviours between HS and Mojave is described (without reference to Safari)."

And there were the 2 obvious screen shots with which I won't clutter this post.
If I get any response, I will let you know. :)
 

usagora

macrumors 601
Nov 17, 2017
4,869
4,456
@gilby101 Great posts and thanks for keeping us in the loop! I personally want all extensions displayed, so this issue doesn't really affect me, but it really should work consistently for those who prefer extensions not be displayed. Hopefully Apple will address this.
 
  • Like
Reactions: jk73

HDFan

Contributor
Jun 30, 2007
7,257
3,316
The OS knows what type of file it is without it being in the file name.

No, that isn't right. If you create a new a jpeg and remove its extension, the default app for opening it is TextEdit.

Yep. There are thousands of file types - excel, word, evernote, pdf, mail, etrecheck, wireshark capture, etc. Often when you try to find a file in an application it will only find the files that it "knows" - those with the extension that it uses. If you try to open such a file in the finder the OS won't know which app to open it with.
 

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
If you did that in Finder then you were never really deleting the extension. Finder just hid the extension when you "deleted" it. ...

Right, that's what I'm talking about — the file extension being visible in the file name. I'm not talking about wanting to create files without a file type.
 

jk73

macrumors 65816
Original poster
Jul 19, 2012
1,321
1,286
Ok, that makes sense, but I could've swore (along with the OP) that it used to behave as we're expecting it to. But maybe I'm confusing it with the Windows option "Hide extensions for known file types" which behaves that way.

No, it definitely worked that way pre-Monterey. (In my case, I've never owned a Windows machine, so I'm not thinking of anything Windows-related.)

To add to the confusion here, according to Apple, macOS HIDES extensions by default (at least "usually"). So why does this not seem to be the case in Monterey? Because even with the "Show all filename extensions" UN-checked, every file created/saved or downloaded seems to show its extension in Finder by default.

Has to be a bug.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.