<< Click to Display Table of Contents >> Navigation: 3. Script Language > Filesystem-Commands > Filesystem-Commands |
MiniRobotLanguage (MRL)
FPC. Command
Filepath Physical Convert
Intention
Convert a physical File-path like:
\Device\HarddiskVolume4\projects\explorer-guard.exe
into a Letter-File-Path like this:
F:\projects\explorer-guard.exe
You can also go all the way back and convert a Letter-File-path into a physical File-path.
FPC. has two Modes of Operations and in each you can choose, in which direction you want to convert.
If you simply write:
VAR.$$FIL=\Device\HarddiskVolume4\projects\explorer-guard.exe
FPC.$$FIL
DBP.$$FIL
You have converted the physical File-path to a Letter-File-path. This is what you get:
To go the opposite direction, all you need to do is, to prefix the filename with a ">" Sign. Like this:
VAR.$$TXA=F:\projects\explorer-guard.exe
FPC.>$$TXA
DBP.$$TXA
ENR.
This way you have converted the Letter-File-path to a physical File-path. This is what you get:
You can give two Parameters. In that case P1 is the source-file-path and P2 is the variable that will get the result after the conversion.
Or you can just write this:
FPC.\Device\HarddiskVolume4\projects\explorer-guard.exe|$$RES
In this case, the result will be placed in $$RES. Of course you can use a variable for the source filename:
VAR.$$SRC=\Device\HarddiskVolume4\projects\explorer-guard.exe
FPC.$$SRC|$$RES
is equal to:
VAR.$$SRC=\Device\HarddiskVolume4\projects\explorer-guard.exe
FPC.<$$SRC|$$RES
and is the same like:
VAR.$$SRC=<\Device\HarddiskVolume4\projects\explorer-guard.exe
FPC.$$SRC|$$RES
All these will do the same. We have just omitted the"<" because its the default operation, if the ">" is not given.
Syntax
FPC.[</>]P1[|P2]
Parameter Explanation
[</>] - Direction of conversion:
> - Convert Letter-File-Path to physical File-Path
< - (defaul, if omitted) Convert physical File-Path to Letter File-Path
P1 - VAR with the Source-Filename. If P2 is omitted, P1 is also the destination.
P2 - (optional) VAR for the conversion result. If omitted, the result will be
placed in P1.
Example
'***********************************
' FPC.-DEMO 1
'***********************************
VAR.$$TXA=>explorer-guard.exe
FPC.$$TXA
DBP.$$TXA
ENR.
'***********************************
' FPC.-DEMO 2
'***********************************
VAR.$$TXA=\Device\HarddiskVolume4\projects\explorer-guard.exe
FPC.$$TXA
DBP.$$TXA
ENR.
'***********************************
' FPC.-DEMO 3
'***********************************
FPC.\Device\HarddiskVolume4\projects\explorer-guard.exe|$$TXP
DBP.$$TXP
ENR.
Remarks
The file/folders must not physically exist, but the drive must exist and have a valid drive letter.
Limitations:
-
See also:
• IEF. / NEF. - If - exist - File