<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > String Operations |
MiniRobotLanguage (MRL)
ALB. Command
After Last Backslash
Intention
Split a file-path or string (text) at the slash or backslash. Return the Part after the last backslash or slash in the string. The effect is very simple. If you have a string:
http://www.fa2.de/index.html
ALB. will return all after the last slash/backslash, in this case we get
index.html
As it supports the backslash "\" as well as the slash "/", it can be used on windows-pathes as well as on web-URLs.
Syntax
ALB.[P1][|P2]
Parameter Explanation
P1 - Path or hyperlink or string as text or as variable
P2 - Variable for Result. If omitted, Result is been put on TOS.
Example
'***********************************************
' Sample: ALB
' AWT at 2011-07-07
'***********************************************
'
' fill variable $$MYP
VAR.§§MYP=?pfad\AWT.dll
'
' use ALB to get the filename into §§SOL
ALB.§§MYP|§§SOL
PRT.Variable MYP is: §§MYP
PRT.Variable SOL is: §§SOL
' Another example
VAR.§§FIL=C:\MyDir\Mydir2
' In this case the result will be placed on the TOS
ALB.§§FIL
' Use VRT. if you have pathes with a "\" at the end
VAR.§§FIL=C:\MyDir\Mydir2\
' In this case the result will be placed on the TOS
VRT.§§FIL|\
ALB.§§FIL
DMP.6
MBX.Ready
'-----------------------------------------------------------
Remarks
-
Limitations:
-
See also: