FILEIFEXIST

CodeGen

FILEIFEXIST

 

This token reads the content of a text file and inserts the resulting data into the output stream. The file can either be located in the current directory, or you can include a logical name specification to specify the location of the file. If the file is not found then the token is ignored and no error is generated.

The file may contain any number of lines of text, and may also contain generic or structure expansion tokens, which will be expanded in the usual way. If the token exists on the same line as and subsequent to other text, then the first record from the file will follow that text in the resulting output file. Any subsequent records from the file will appear on new lines in the output file.

Usage

<FILEIFEXIST:name.ext>

<FILEIFEXIST:LOCATION:name.ext>

Alternate forms

None

See also

Other generic tokens

Video

Here's the Using Template Include Files video. Make sure you select a high-definition version of the video, by default YouTube tends to play the lowest resolution which can look pretty awful!

 

 

 


Copyright © 2012  Synergex International, Inc.