macOS – Save File to Hidden Directory with Standard Save Dialog

applicationsmacostexteditxcode

Using TextEdit, when I try to save example.txt to some hidden directory, for example ~/Library, I can't because save panel doesn't show them.

The only way I found was to save file to non-hidden directory and then copy/paste them to desired hidden directory.
This is pretty common for me, for example when I want to try I/O for console programs in Xcode, executables are in ~/Library/Developer/Xcode/ which is a hidden directory.

But that doesn't apply only to TextEdit, I tried Text Wrangler, Photoshop, Grapher, only Blender, which doesn't use native window system allows me to save it anywhere. My question is, is this common behavior? Is there any workaround (except for saving it to non-hidden+copy/paste), or some hidden setting?

EDIT: adding picture

as below suggestted, typing / you can specify your directory, providing you know the exact path, but what if there are more than 1 hidden files in your path? On the left is save panel without hidden directories, on the right Finder with enabled hidden directories.

Mac default save vs. Finder

Best Answer

The built in way to do this by using a key combination when in the save/open dialogs to toggle the hidden files to visible or hidden


Update: This shortcut works in all views, But in column view it does not update the view to show the change until you navigate to another directory. Not sure why this is the behaviour. But you can toggle it in column view click on another folder (in the parent column on the left) and back to see it has changed.


When you are in the Save or Open Dialogue of the app.

Press and hold the CMD + shift and then . keys at the same time.

This will toggle hidden files/folders in the Save or Open Dialogue.


[toggled to hide invisible files/folder]

enter image description here


[toggled to Show invisible files/folder]

enter image description here


Note: You do not need to have hidden files/folders set to visible in the finder This toggle works independently.