FileTemplateApply

FileTemplateApply[template]
applies a template, evaluating all template elements it contains, and then writes the result to a temporary file, whose name is returned.

FileTemplateApply[template,args]
applies a template, using args to fill its slots, and then writes the result to a temporary file.

FileTemplateApply[template,output]
applies a template, writing the results to the file represented by output.

FileTemplateApply[template,args,output]
applies a template, using args to fill its slots, and then writes the result to the file represented by output.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

FileTemplateApply works with any expression:

In[1]:=
Click for copyable input
Out[1]=

The first argument is handled by TemplateApply and can be a String, File, or any TemplateObject:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Specify a path to export the template in the specified location:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2014
(10.0)