18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

FileRename<br />

FileRename is a built-in scripting function that renames a specified file.<br />

Function Group Execution Windows Embedded Thin Client<br />

FileRename File Synchronous Supported Supported Supported<br />

Syntax<br />

FileRename(strOldName,strNewName)<br />

strOldName<br />

strNewName<br />

The path and old name of the file.<br />

The path and new name of the file.<br />

Returned value<br />

This function does not return any value.<br />

Examples<br />

FileRename( "C:\readme.txt", "C:\readthis.txt" )<br />

FileWrite<br />

Writes a string to a specified ASCII or Unicode file. If the file doesn't exist, then the function will create the file.<br />

Function Group Execution Windows Embedded Thin Client<br />

FileWrite File Synchronous Supported Supported Supported<br />

Description<br />

Writes a string to a specified ASCII or Unicode file. If the file doesn't exist, then the function will create the file.<br />

Syntax<br />

FileWrite(strFileName,strWriteText{ | ,optNumAppend })<br />

strFileName<br />

strWriteText<br />

A string value enclosed in quotes, or the name of a String tag that contains the value, specifying<br />

the file name.<br />

By default, the file will be written in your project folder (i.e., the folder that contains the file<br />

project_name.APP). To write in another folder, specify the complete file path.<br />

A string value enclosed in quotes, or the name of a String tag that contains the value, specifying<br />

the text to be written to the file.<br />

optNumAppend<br />

A numerical value, or the name of an Integer tag that contains the value, specifying the text<br />

encoding of the file:<br />

Value<br />

Description<br />

0 Creates a new ASCII file with the given file name. If the file already exists, then it is overwritten.<br />

1 Appends to an existing ASCII file with the given file name. If the file doesn't exist, then a new file is created.<br />

2 Creates a new Unicode (UTF-16LE) file with the given file name. If the file already exists, then it is overwritten.<br />

<strong>InduSoft</strong> Web Studio Page 631

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!