<< Click to Display Table of Contents >> Navigation: 3. Script Language > Filesystem-Commands > FIL. - File-Commands > FIL. - File-Commands |
MiniRobotLanguage (MRL)
FIL.swp
FIL.Swap Files
Exchange the name of two files
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:
• IEF. / NEF. - If - exist - File