This question is very similar to this one except that I want to maintain the file's original subdirectories.
For example if I had
/temp/a/a.txt /temp/a/a.jpg /temp/a/b.txt /temp/b/c.txt /temp/d/d.txt /temp/d/d.jpg /temp/d/e.txt /temp/f.txt
I'd want to copy all the text files to /temp2 so that the directory structure would look like:
/temp2/a/a.txt /temp2/a/a.jpg /temp2/a/b.txt /temp2/b/c.txt /temp2/d/d.txt /temp2/d/d.jpg /temp2/d/e.txt /temp2/f.txt
Thanks for your help!!