WinRar can do this. Right-click the folder you want to archive, and select "Add to archive..." Go to the files tab, and in the "Files to add" field, append "\*.txt" to the path of the folder, without the quotes. Set any other options you want, and click ok.