I want to use the zip command to create a .ZIP of a folder but only include .txt files.
Subdirectory structure should be preserved!
If you're certain that none of the filenames will contain a newline then you can use find as explained in the zip(1) man page.
find some/dir -type f -name '*.txt' -print | zip ... -@ ...
4 years ago