The FileTemplate processor offers basic functionality when dealing with file / directory templates. It copies a template directory tree into a new location, renaming files where applicable, substituting the contents where specified, and processing scripts embedded in the template tree.

To get a general idea of how this is done, please read the processing phases documentation.

To learn about creating new templates or extending existing templates, you should also read about template options and substitution templates.