File (Reserved Word)

image\trumpet2.gif Disclaimer

Sends information to a specified file from a Print statement.

File("c:\windows\filename.txt")

Where "c:\windows\filename.txt" is a string expression that must be a valid path and file name encompassed in quotes.

Remarks

The name of the file must be string literal as variables and inputs are not permitted as file names.

Example

If you wanted to send the date, time, and close information from a chart to a new ascii file named mydata and located in the data directory by applying an indicator, you could use the following syntax:

Print(File("c:\data\mydata.txt"), Date, Time, Close);