Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

ATF. - Append to File

Previous Top Next


MiniRobotLanguage (MRL)

 

ATF. Command

Append to File

 

NTFS-Direct

 

Intention

 

This command is useful to write Log-Files. It will  append any content (Text or binary) to an already existing file. Or, if the file does not already exist, it will create a new file.

ATF. does not append newline-characters $crlf$ automatically. This has to be done manually if needed.

 

 

 

Syntax

 

ATF.[P1] [|P2] [|P3]

 

 

Parameter Explanation

 

P1 - File Name

 

P2 - Text or Data

 

P3 - Opt. Variable which receives 1/0 if operation was successful.

 

 

 

Example

 

'*****************************************************

' EXAMPLE 2: ATF. Append with Newlines

' create a Logfile on yourdesktop

'*****************************************************

'DBM.2

' This is the filename and path on the desktop

: $$FIL=?desktop\RND.txt

 

FOR.$$AAA|1|20

' Generate a Random Number between 124 and 123125

 RND.124|123125|$$REB

' Here comes the Newline

 VAR.$$REB=$date$ ** $time$> The Number is: $$REB$crlf$

' Append the Numbers to the File without Newline

 ATF.$$FIL|$$REB|$$ERG

 PRT.[$$AAA]->$$ERG

NEX.

MBX.Please see the File $$FIL on your desktop.

END.

'***********************************************

 

 

 

Remarks

 

 

 

Limitations:

 

 

 

See also:

 

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    CTI. - Copy-To-Inifile

    CFI. - Copy-From_IniFile

    COP. - Copy File

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    SHF. - Shell-File-Operation

    WFF. - Wait-For-File