how to close all subfolders in a folder

I have seen this question, or similar, in several places, but haven't seen an answer. Sometimes the question is not well stated or understood. So, here goes one more time.


Suppose you have a folder named House. Inside House are subfolders named Kitchen, Bedroom1, Bedroom2, Bathroom......


Now, after browsing through all the subfolders inside House, they are all open, showing their internal files, and filling up the screen, makeing a cluttered mess.


I would like a simple command to close all the subfolders inside House in order to clean up the mess.


Is there a way to do this with an existing command, script, or Automator?


Thanks🙂

OS X Mavericks (10.9)

Posted on Jan 14, 2014 6:51 AM

Reply
8 replies

Jan 14, 2014 11:27 AM in response to Cosman

Thanks. The "disclosure triangle" appears only in List View:


User uploaded file


As far as I know the selected "view" option should not change when opening a folder. In other words double-clicking the iTunes folder above opens it in the same window, with List View still active. From what you describe that isn't happening.


Check View Options for the selected folder: Finder's View menu > Show View Options. There is an option to "Always open in list view" (or whatever option happens to be active) if that is what you want.


There is almost certainly a way to make Finder do what you want, but it is possible that a bug exists that's preventing you from doing it.

Jan 14, 2014 10:26 AM in response to Cosman

My reply above had a lot more in it, but it got lost, so here goes.


The keystroke combo opt-click closes the main folder and all the subfolders, so you can't actually see what happened until you reopen the main folder. Then you see all the internal folders are closed. My main use for this function it to leave the main folder open while closing all the subfolders. To do this requires reopening the main folder. There are several options:


1) opt-click followed by click closes the main folder and all the subfolders, then repoens the main folder with all the subfolders closed.


2) opt-click followed by opt-click first closes the main folder and all the subfolders, then reopens the main folder with all the subfolders open again (back where you started from).


I tried to make an Automator macro that would do 1) with one mouse click (with suitable modifier keys), but I didn't know enough to make it work. I could get automator to do it while Automator was open by clicking on Run, but I couldn't get a macro that would work directly from a mouse click without opening Automator. Tried the same thing in Keyboard Maestro with the same results.


I would love to have something like ctrl-opt-click that would do the whole sequence 1) above in one stroke.


Oh well, it works fine with several steps.

Jan 14, 2014 11:12 AM in response to John Galt

John,


I guess my terminology could be confusing.


If I double click on a folder icon or name, the folder opens in a new window.


If I click on the little triangle on the left, the folder opens in the same window.


Sometimes I do one, sometimes I do the other.


My reference to opening and closing folders in this thread is based on staying in the same window, that is, clicking on the little triangle. The opt-click command only works on the little triangle, not on the name/icon. That requires a double click and ignores any modifier key.


So, our posts are talking about different folder functions.

Jan 14, 2014 11:48 AM in response to John Galt

Right, the triangle only appears in List and Cover Flow views. These are what I use most, so I didn't notice the others.


BTW, I switch back and forth from List to Cover Flow when I am looking through a folder with CAD, pdf, jpgs, (visual stuff) in it. Using cmd-4 and cmd-2 to toggle between the two cuts the clutter when I don't need it. A quick way to shut 10 open subfolders is the last part of my workflow quest.


Some day I am going to dig deeper into Scripting and Automator to learn how to use them. I can get a script going, but don't know how to save it and use it when finished. The instructions are not very clear at that point, and I don't have the time to figure it out blind. I am not interested in any kind of macro I can't call with a keystroke. That is why I use Keyboard Maestro.


Regards

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to close all subfolders in a folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.