Here’s something simple, but useful for working with Apple Finder.
To expand all currently visible folders in Apple Finder use Command-A (to select all folders) then Command[Right Arrow] to expand. You’ll need to make sure the pane in which you’re wanting to select all is active. Just click anywhere in it, if you’re not sure.
To contract them again just use Command-[Left Arrow]
If you want to expand a folder and all its child folders, select the parent folder and hold down the Option key whilst then clicking the little triangle next to the left of the folder name. Or, if the folder is selected, you can hold down the Option key and click the right arrow key on your keyboard. Use the Option-[Left Arrow key] to close it back up.
If you want to drill down into a folder with Command-[Down Arrow], and back up to the parent folder with Command-[Up-Arrow key].
If you want to expand every folder, and all their child folders, use Command-A (to select all). Next hold down the Option key while you use the right arrow key to expand every folder in the view (Option-[Right-Arrow key]), and every folder inside of those folders, and every folder inside of those folders. This may create some chaos if you have lots of nested folders (like I do). Reverse this procedure by selecting all (Command-A) and using Option-[Left-Arrow key] to but it all back into order again.