Yes, you can hide folders and subfolders on a Mac by using the Terminal. To hide a folder, open the Terminal and type the following command*:
chflags hidden /path/to/folder
To hide a subfolder, use the same command but include the path to the subfolder:
chflags hidden /path/to/folder/subfolder
Both of these commands will make the folder or subfolder invisible in Finder and removed from any searches.
To unhide the folder or subfolder, simply reverse the command using the ‘nohidden’ feature:
chflags nohidden /path/to/folder
chflags nohidden /path/to/folder/subfolder
*replace with the actual path to your folder. To find this, navigate to the folder (or subfolder) you wish to hide in Finder and ctrl+click or right-click and select “Get Info”.
This will reveal the system path to the folder which you can copy and paste in place of /path/to/folder or /path/to/subfolder above.