Sadly, Illustrator CS5 can't remember the states of the layers between saves, so every time you open a file, all the layers are expanded, so you have to waste a few good clicks to close them before you are ready for action.
If you don't care at all about this, just stop reading and get back to work!
I was really annoyed by this for a very long time, and I decided to do something about it.
I don't know if you've heard about this, but if you hold the ALT key while expanding/collapsing a layer, it will do this for all the sub-layers inside. That's great, so that means that all you have to do is put everything in one layer, and then just ALT+click that when you open your file, and you're done.
As always, there is a catch. This will not work if the sub-layers are hidden or locked. If you don't usually hide or lock layers, then you're already set: use ALT+click and you're done.
For the rest of us, I present you my extension, AI Tools v1.0.0, with only one tool - Collapse All
After installing the extension using the Extension Manager, the Collapse All panel will help you make all the layers visible (and unlock them), so you can ALT+click to collapse the top layers.
And here are our layers when we open the file:
First you have to click on the (1) Make all visible, then (2) ALT+click on the top layers to collapse.
Step (3), press Restore to get back to the original visibility state.
Elapsed time: 5 seconds.
Please note that I actually expanded the top layers again in my previous picture, but without holding ALT this time, so I can show you that all the sub-layers are all nice and hmm... colapsed.
And here is the extension: AiTools-1.0.0.zxp
Currently I think it only works with Adobe Illustrator CS5, but if people are interested, I can see what I can do about that.
When I'll get some more free time, I'll create a nice panel for my other script: ai-layers-export.
Thanks for reading, and let me know if you have any problems (on any topic related to Illustrator missing features).