I'm attempting to write a bash script to hide empty folders recursively within the current directory.
This will ultimately be used as part of an Alfred workflow, allowing me to hide/show extra folders in my default project folder hierarchy. The goal is to keep my sanity when reacquainting myself with a project, but keep folder structure in place so I can keep things consistent from project to project.
I've been experimenting with this terminal command
find . -empty -type d -exec chflags hidden {} +
This works in theory, but the problem is Mac OS X adds system files to folders that I'd like to consider empty for my purposes.
How can I ignore files like .DS_Store when hiding directories?