Asked
— Edited

example
This is ok
$BasePath = "G:"
but this gives error
$BasePath = "G:/"
it is because of the / , im asuming is being used as an escape char in Ez-Script.
is there a way to escape this?
.... Do you have the full script to post?
1) Shouldn't it be "G:\"?
2) "G:\" does give an error. However "G:\EZ-Builder" is OK.
What is this for? It may be that there is a better/different way of doing it.
I can code around it. Being familiar with many languages but not so familiar with EZ-Script , most languages have and escape code around this for instand \!" would work in some languages or \\\" to produce single back slash
Again, what's it for? That may help find a solution. I assume some kind of file interaction but would need to know more.
If the intention is to have a path and multiple different $file variables you can always use $basepath as "G:" and have the $file variables (or text) begin with the \
i.e.
Code:
This is they script and its use.
Print("Setting up Variables")
$BasePath = "G:"
$OutputDir = $BasePath + "\DataOut"
$InputDir = $BasePath + "\DataIn"
$Weatherinput = $InputDir + "\wather.rss"
$X10SystemInput = $InputDir + "\HomeX10.rss"
$TaskListInput = $inputDir + "\Tasklist.rss"
Print("Var Setup Completed")
Code:
The filenames would actually be Robot-log.txt and Robot-data.txt
Not ideal but unless I've missed it a variable cannot end with a \
$BasePath = "G:\\"
\ is an escape code in C#. \\ should give you \
$BasePath = "G:\\"
Also resulted in error.
P.S. Thanks for the credit, you're number 250
The out come was just the EZ Script does not allow the \ character at the end of a string.
Code:
this can work to remove the extra space left at the end if you really wanted the \ at the end of the first variable
have any of you guys figured out how to print a forward bracket? i.e. "(" the backslash in front works for printing "\"" but not the (