polilies Posted June 4, 2011 Share Posted June 4, 2011 for(global t=0,t<NumRows(var.strInIs),t++) global string yol = "C:\DaqKayit\ISLETMELER\"+var.strInIs[t]+"TM.txt" var.hFilePass = -1 delay(0.1) var.hFilePass = File.Open(yol,1,0,0,1) delay(0.1) global string InTm = File.ReadDelim(var.hFilePass,-1,-1,",",0,1) delay(0.1) if (InTm == "") var.hFilePass = File.Close(var.hFilePass) break else //component.combotm.ClearChoices() //for(x=0,x<NumRows(InTm),x++) isletme[t].tm = InTm delay(1) //endfor endif var.hFilePass = File.Close(var.hFilePass) delay(1) endfor In this code i'm reading some file and get the data to class spesified variable. in for loop the first turn executes but when the second turn comes it stoped. firstly i was using "var.stryol" then change the variable to "global string yol".it was still doing same prosess. the interesting thing is it's executing one loop. and i can see the content of "isletme[0].tm[0],isletme[0].tm[1],isletme[0].tm[2]" and DF gives me "F0003 All or part of the path is invalid" error. when i look for the path every thing is correct. in other way when i change the variable which includes only the wanted path, it reads the file. is it about variable working style or "File.Open" functions working style or me i'm adding an pic to see you the DF's watch screen. Link to comment Share on other sites More sharing options...
AzeoTech Posted June 5, 2011 Share Posted June 5, 2011 You might try using the showHidden() function when looking at your strings to make sure there aren't any illegal, non-printing characters hidden in there. The error you get comes from the file system. Link to comment Share on other sites More sharing options...
polilies Posted June 6, 2011 Author Share Posted June 6, 2011 thank you again you're right there were some hidden characters. then i use "HideHidden" function to eliminate hidden characters which cause from written them one under the other .it solved again thank u Guru. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.