Create substitution file from template files