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?


  • 1
    If you remove all the dots in the name it should revert to folder Dec 20, 2016 at 3:52

3 Answers 3


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).

  • Since the .tmp file extension does not show a default app, it seems that the OS X System has a use for temporary folders.
    – user71997
    Mar 4, 2014 at 18:24
  • @pknz which OS X System version is affected?
    – user71997
    Mar 4, 2014 at 18:25
  • I am running 10.8.5.
    – pknz
    Mar 4, 2014 at 19:56

Was able to resolve this issue from information here.

Basically associate the file extension with another app, ie Calculator, then clear the associated by running this command in Terminal:

`locate lsregister` -u /System/Applications/Calculator.app

followed by:

xattr -d com.apple.ResourceFork *file_which_won't_open*

This clears the extended attributes on the file.

Full details below:


  • 2
    Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone.
    – nohillside
    Mar 4, 2014 at 18:51

Unfortunately the solution above could not solve the problem, because the macOS would restructure the association soon later(environment is macOS 11.15.7).

So I download an unnecessary app from the AppStore and change this extension file default open with it, such as Xnip.app. After running command as below delete this app from LaunchPad quickly.

`locate lsregister` -u /Applications/Xnip.app

If you download this app again, it will associate with it again. This is not perfect solution, but worked for me.

  • Please look at the faq to understand how the site works, how good answers should be written and how reputation can be gained.
    – nohillside
    Jul 6, 2022 at 5:06

You must log in to answer this question.

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