Skip to content

FileTempName Operator

Martin Danielsson edited this page Jul 23, 2015 · 3 revisions

Use the FileTempName to create a temporary file name, which may e.g. be used for the FileWriteText Operator.

What Type
Syntax FileTempName(forWhat)
forWhat string
Return type string

For every different value of forWhat which is passed to the FileTempName operator, a temporary file name will be created; for every source record, a new temporary name will be created; if the same forWhat value is used in multiple calls to FileTempName for a single record, the same temporary name will be returned.

Example:

<Fields>
  <Field name="FileName">FileTempName("text")</FieldName>
  <Field name="FullFileName">FileWriteText("..\output\temp\" + FileTempName("text"), $TextBody)</Field>
  ...
</Fields>

This code will output the same file name into two fields, one with the full path, one without the path. Additionally, it will write the content of $TextBody into that file, as text.

See also:

Clone this wiki locally