simple copy text files

I am trying to copy all text files in my Documents folder in to a new folder on desktop, I found a lot of scripts that do this, but i want to maintain the directory structure of the files.

For eg: Documents/Project1/Text1.txt
Documents/Project2/Text1.txt
has to be copied to
Desktop/TextFiles/Project1/Text1.txt
Desktop/TextFiles/Project2/Text1.txt
Hlp pls

It seems like all you’re doing is copying and then renaming, according to your example. Am I missing something?..

set theDesktop to (path to desktop)
set theDocuments to (path to documents folder from user domain)
set newFolderName to "TextFiles"

tell application "Finder"
	set newFolder to duplicate theDocuments to theDesktop
	set name of newFolder to newFolderName
end tell

j

I want to copy only files with extension .txt. There are some subfolders which do not have any text files, and I do not want to copy them