MacOS – renamed folder becomes a file with an extension

file extensionsfoldersmacmacos

When I create a folder and name it "test.tmp" the finder asks me if I want to add the file extension ".tmp" to my folder. When accepted, the folder changes to a document with an icon.

I then can no longer open the 'folder' by double clicking on it. There is no default application associated to open the test.tmp file.

If I run ls -l the file is still shown as a directory.

On another Mac I am able to create this same folder name, and the folder remains a folder.

Any idea why on my Mac adding the .tmp changes the folder to a file?

TIA.

Best Answer

Folders can have a suffix too. If your OS X System knowns the file extension, it will change the icon (after renaming) and link it to the App that can handle that extension (and is set as default App to open those file types).

The folder then becomes a package or container, where you cannot easily look inside by browsing in finder. But you can right-click on it and choose "Show Package Contents" to see what is inside.

show inside with "Show Package Contents"

Sometimes the (folder-) file extension is hidden by System Default (as for iPhoto Library containers).