Having 30 or 40 windows of different folders open, is there any way to close all of them at once? I tried to relunch Finder, and I was happy for a second having no open window anymore, but it reopened all the folder windows again :-)
Yes, you can use the shortcut ⌥ option + ⌘ command + W.
A sidenote on this: Often such commands are not visible in the main menu if you just click it. However, if you press ⌥ while the menu is open, then the menu will change to view the alternate feature.
File > Get Info ⌘I
will turn into File > Show Inspector ⌥⌘I
once you press ⌥. As you can see in this image, Close Window ⌘W turns into Close All Windows ⌥⌘W as well.