How To Mac

How to Show and Hide Files & Folders on Mac

Written by John

There are many ways to keep your private files safe on the macOS operating system, but if you want them hidden from prying eyes there's not much choice. However, there is a way to hide files and folders on macOS. We can use Terminal commands or keyboard shortcuts for this purpose but if you have many files and folders then it becomes difficult as well because those methods only work with single-file tasks at best. In this tutorial we show how easy it is fix the issue by creating simple scripts in Shortcuts App.

First, we will learn how to use keyboard shortcuts so you can easily show hidden files or folders. Then we create a simple scripts using Shortcuts App that allows to run Terminal commands quickly in order hide/show your favorite content!

How to Show and Hide Files & Folders on Mac

1. Show Hidden Files and Folders

The quickest way to unhide files or folders on macOS is by using the keyboard shortcut "Command" + "Shift"+ "." You can use this anywhere as long you are working with files and folders, just press these keys together for hidden items then again if needed so they're visible.

Show Hidden Files and Folders in Finder

2. Create Simple Shortcuts to Access Hidden Files

The chflags command enables you to hides files and folders on macOS. You can use this utility by executing a single line in Terminal, which will hide or restore any hidden file. Shortcuts is a great way to execute Terminal commands with path of files or folders, so you'll never have any trouble remembering this commands line.

With Shortcuts, you can create custom tasks to make your life easier. It's a tool that comes with macOS and works on any version of MacOS Monterey and Ventura if older than those two releases - but don't worry! You'll still be able use previous versions which was called "Automator".

The Shortcuts or Automator is very simple to use, but first you can open it with Spotlight search or go into Applications > Utilities folder. Next create a new shortcut by following these steps:

Hidden Files with Shortcuts App

The Shortcuts app makes it easy to create custom shortcut for any task you need help with. All your favorite tasks are right at hand, tap on the Search bar at top right and type in what you're looking for;

Choose from menu (In this part, we create two menus: Hide Files and Show Hidden Files)

Hide Files

Select File
Get Details of Files (Click on Details and select "File Path")
Run Shell Script
chflag hidden "File Path"

Show Files

Select File
Get Details of Files (Click on Details and select "File Path")
Run Shell Script
chflag nohidden "File Path"

End Menu

To make it easier for you, we have created a similar shortcut and replaced Files to Folders with the command below.

Hidden Folder with Shortcuts App

This is a very easy way to quickly hide or show hidden files and folders on Mac. All you need do it run the shortcut, select Hide File or Show Hidden from below options menu that appears!

Create Simple Shortcuts to Show and Hide File and Folder

To Show Hidden Files/folders, first press "Command" + "Shift" +"." Then choose whether you want to hide or unhide files/folders.

3. Rename to Hide File

The easiest way to keep your file hidden is just by renaming it with a dot at the beginning of its name. We just need to rename the file name starting with a dot “.” then it will be made hidden file and all we have do is remove that extra letter from front of name to show hidden file. By taking the following steps, you can make sure that your files are hidden from view.

Rename to Hide File

4. Use Terminal to Hide/Show Files and Folders

The Terminal is a really useful tool if you want to do anything with your Mac, like hide or show files and folder. You remember when we used chflags command in step 2? Terminal commands are a way to access and change the hidden files on your computer. You can use this for things like hiding or showing items in different folders, but it's also really helpful if you want quick access anytime without having open up Finder. The basic command looks something like this:

Use Terminal to Hide and Show File and Folder

defaults write com.apple.finder AppleShowAllFiles true
killall Finder

When working on a Mac, there are many ways to hide and show your files and folders. You can create another better shortcut base from this tutorial if you want! Repeat commands in the Shortcut will allow for hiding multiple directories at once with just one click or option; adding custom keyboard shortcuts is an easy way of quickly removing something from sight without having to navigate through menus every time - especially when using short keys like "Command" + "Shift" + ".". I hope these tips will help get your job finished quickly.

Leave a Comment