I have a project with lots of hidden folders / files in it. I want to create a zip-archive of it, but in the archive shouldn't be any hidden folders / files. If files in a hidden folder are not hidden, they should also not be included.

I know that I can create a zip archive of a directory like this:

zip -r zipfile.zip directory

I also know that I can exclude files with the -x option, so I thought this might work:

@downvoter: What's wrong, this seems to be working for me.
–
i08inMay 8 '14 at 16:55

Same problem as with Rinzwind's original answer (now corrected): you aren't excluding subdirectories. And as Rinzwind noted, you need to quote the wildcards, otherwise the shell will expand them.
–
GillesMay 8 '14 at 17:25