- Web Studio Help
- Appendix: Built-in Scripting Language
- File functions
File functions
These functions are used to read from, write to, print, move, and delete external files.
- DeleteOlderFiles
Deletes files that are older than a date matching the configured mask from the configured path. - DirCreate
Creates the specified directory. - DirDelete
Deletes the specified directory. - DirLength
Returns the size of a specific directory. - DirRename
Renames directories. - FileCopy
Copies the file(s) configured in the strSourceFile parameter to the path/file configured in the strTargetFile parameter. - FileDelete
Deletes the specified file. - FileLength
Gets the size of a file. - FileReadFields
The function FileReadFields reads values contained in the fields of a CSV file, and then it writes those values to a series of project tags or array elements. - FileReadMessage
The function FileReadMessage reads a message (i.e., a string of characters) from a text file, and then it writes that message to a project tag. - FileRename
FileRename is a built-in scripting function that renames a specified file. - FileWrite
FileWrite is a built-in function that writes a string to a specified text file. If the file does not exist, it will be created when the function is executed. - FileWriteFields
The function FileWriteFields reads values contained in a series of project tags or array elements, and then it writes those values to the fields of a CSV file . - FileWriteMessage
The function FileWriteMessage reads a message (i.e., a string) from a project tag, and then it writes that message to a text file. - FindFile
FindFile is a built-in scripting function that searches for all files that match a given search string. - FindPath
Verifies whether a directory exists. - GetFileAttributes
Reads the attributes of a specified file. - GetFileTime
Reads the time and date the file was last modified. - GetHstInfo
Returns the Start Time, End Time, and Duration of the specified history (*.HST) file. - GetLine
Gets a specified line or search string from a text file and then stores the line in a String tag. - Hst2Txt
Hst2Txt is a built-in function that exports Trend historical data from InduSoft Web Studio‘s proprietary binary format to a text file. - HST2TXTIsRunning
Returns the status of the HST2TXT function. - ImportXML
The function ImportXML is used to import Studio XML files into your project during run time. - LookupContains
This function verifies that an external file contains the specified keyword in its key column. - LookupGet
This function gets a value from an external file by cross-referencing from a specified keyword. - LookupLoad
This function loads an external file — typically, a delimited text file — that can be used to look up table values. One column of the file is designated as the keywords column, and another column is designated as the values column. - PDFCreate
Creates a PDF file from the specified source file. - Print
Prints a text file. - RDFileN
Launches a File Browser window allowing you to select a file. - WebGetFile
Downloads a file from a specified address and then saves it locally.
Parent topic: Appendix: Built-in Scripting Language
InduSoft Web Studio -Technical Reference