Search for contents of directory and copy

You could try the button linked at the end of this thread, it will select all folders containing a specific filetype: Label filters, how to higlight folders containing PDFs
Some minor adjustments may be needed to meet your expectations (maybe to not show the popup wich asks for the extension).
After that run the COPY command to copy the selected folders into your "Result" folder/collection.