Login  Register

replace characters

Posted by Adam Hacking on Jun 10, 2009; 4:44pm
URL: http://imagej.273.s1.nabble.com/replace-characters-tp3692181.html

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