TestIT:Programming Files

From Nolek Wiki
Jump to navigation Jump to search

5.3.8 Files

FileWrite

Description:
It will write to a file.

Code example:

Files.FileWrite(FileDevice,"NewFile",_ST01;_ST02;_ST03,Done)
Parameters
Parameter Type Description
Device name String or String symbol The device name
File name String or String symbol The name of the file to use or create
Values Symbol Array Array of symbols to write to the selected file. Split with configured delimiter.
Done Bool symbol Will be set when command is done

FileRead

Description:
It will read from a file.

Code example:

Files.FileRead(FileDevice,"NewFile",_ST01;_ST02;_ST03,Done)
Parameters
Parameter Type Description
Device name String or String symbol The device name
File name String or String symbol The name of the file to use or create
Values Symbol Array Array of symbols to insert the values from the selected file. Split with configured delimiter.
Done Bool symbol Will be set when command is done

FileDelete

Description:
It will delete a file.

Code example:

Files.FileDelete(FileDevice,"NewFile",Done)
Parameters
Parameter Type Description
Device name String or String symbol The device name
File name String or String symbol The name of the file to delete
Done Bool symbol Will be set when command is done

FileExecute

Description:
It will execute a .bat or .exe file. Only if the device is configured to do this.

Code example:

Files.FileExecute(FileDevice,"NewFile",Done)
Parameters
Parameter Type Description
Device name String or String symbol The device name
File name String or String symbol The name of the file to use
Done Bool symbol Will be set when command is done

FileOpen

Description:
It will open a file.

Code example:

Files.FileExecute(FileDevice,"NewFile",Done)
Parameters
Parameter Type Description
File name String or String symbol File name to use and path
Result String symbol Symbol to receive result

FileExists

Description:
It will check if the file exists.

Code example:

Files.FileExecute(FileDevice,"NewFile",Done)
Parameters
Parameter Type Description
Device name String or String symbol Device name to use
File name String or String symbol File name to use
Exists Bool symbol True=1, False=0


Back to Programming - Commands