FIL. - File-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands > FIL. - File-Commands >

FIL. - File-Commands

FIL.Swap Files

Previous Top Next


MiniRobotLanguage (MRL)

 

FIL.swp

FIL.Swap Files

Exchange the name of two files

 

NTFS-Direct

 

Intention

 

This command is used to "Swap two Files". This means that File A becomes File B and File B becomes File A.

 

 

'Teste FIL "Swap Files".

VAR.$$LAA=?path\Testfolder\

$$LAB=$$LAAFile_005.txt

$$LAC=$$LAAFile_009.txt

FIL.swp|$$LAB|$$LAC|$$RES

' In case of success result will be "1"

MBX.$$RES

ENR.

 

 

Syntax

 

 

FIL.swp|P1|P2[|P3]

FIL.Swap Files|P1|P2[|P3]

 

 

Parameter Explanation

 

P1 - Filename and Path, of File A

   

P2 - Filename and Path, of File B

 

P3 - (Output) Variable with the result of the operation.

 If omitted the result is placed on TOS.

    1 - Success 0 - Error

 The timeout Flag is also set in case of Error.

 

 

Example

 

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

' EXAMPLE 2: FIL.Swp

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

'Teste FIL "Swap Files".

VAR.$$LAA=?path\Testfolder\

$$LAB=$$LAAFile_005.txt

$$LAC=$$LAAFile_009.txt

GMD.cf|$$LAB|$$CSA

GMD.cf|$$LAC|$$CSB

FIL.swp|$$LAB|$$LAC|$$RES

GMD.cf|$$LAB|$$CSC

GMD.cf|$$LAC|$$CSD

JIS.$$CSB!$$CSC|Lab_failed

JIS.$$CSA!$$CSD|Lab_failed

FIL.swp|$$LAB|$$LAC|$$RES

GMD.cf|$$LAB|$$CSC

GMD.cf|$$LAC|$$CSD

JIS.$$CSB!$$CSD|Lab_failed

JIS.$$CSA!$$CSC|Lab_failed

ENR.

 

 

Remarks

 

Can acess very large pathes up to 32767 characters due to the use of NTFS-direct.

 

Limitations:

 

-

 

 

See also:

 

    Split File

    Join File

    OPT. - Optional Settings

    GEC. - Get Encryption

    RMD. - Remove-Directory

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    COP. - Copy File

    SHF. - Shell-File-Operation

    MDF. - Make-Direktory-File

    MKD. - Make-Directory

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir