I know I could do the "if" line using two lines, but I am curious why this does not work. I have tried a few variations of the curly brackets and round brackets, but none seem to work.
Let>filename=C:\test.txt
If>{(Pos("\",%filename%)>0)}
Let>note=filename has slashes
Else
Let>note=filename does not have slashes
EndIf
Message>%note%
Is it that the Pos function only works after a relational operator?
Using If> with the Pos function
Moderators: JRL, Dorian (MJT support)
Do it like this:
Let>filename=C:\test.txt
Let>p={Pos("\",%filename%)}
If>p>0
Let>note=filename has slashes
Else
Let>note=filename does not have slashes
EndIf
Message>%note%
Let>filename=C:\test.txt
Let>p={Pos("\",%filename%)}
If>p>0
Let>note=filename has slashes
Else
Let>note=filename does not have slashes
EndIf
Message>%note%
MJT Net Support
[email protected]
[email protected]