In Groovy scripting how to read all .txt files in a given folder and create a single word document by copying the contents of .txt files.
Example Scenario -
In folder C:\Sample i have n-no of .txt files. I need to copy the data of .txt files and create one .doc file and copy paste the contents of all .txt files.
Please let me know how to accomplish this in Groovy scripting