Login  Register

Re: replace characters

Posted by Michael Schmid on Jun 10, 2009; 6:07pm
URL: http://imagej.273.s1.nabble.com/replace-characters-tp3692181p3692182.html

Hi Adam,

you need:
   file_check = replace("C:\\Results.xls", "\\", "/");
   print(file_check);


Michael
________________________________________________________________

On 10 Jun 2009, at 18:44, Adam Hacking wrote:

> sorry if this is somewhat dense. I can't seem to get this to work ....
>
> I need
>
> file_check = "C:/Results.xls"
>
> and I get
>
> file_check = "C:Results.xls"
>
> other permutations result in a error.
>
> file_check = replace("C:\Results.xls", "\\", "/");
> print(file_check);
>    if (File.exists(file_check) == 1) {
>   print("Append file");
>  }
>  else {
>   print("Create file");
>    }
> selectWindow("Log")
>
> Thanks again for all of your help !
>
> Adam
>
>
>
>
>