Page 1 of 1

FileExists function returns 1 even when file is not present

Posted: Tue Jan 08, 2019 5:38 pm
by amit_hhh
Hi,
I am facing a strange issue in TI where FileExists function returns 1 even when the file is not present in the specified directory. It returns 1 also when the file is present.
Not sure why it is happening and it is causing TI logic to fail. Please suggest.
Thanks!

Re: FileExists function returns 1 even when file is not present

Posted: Tue Jan 08, 2019 5:42 pm
by bgregs
Hi!

Would you be able to post the code that is encountering the error? If you have a variable that is holding the file path, could you also post the declaration of that as well? The more the better! :D

Re: FileExists function returns 1 even when file is not present

Posted: Tue Jan 08, 2019 9:49 pm
by lotsaram
amit_hhh wrote: Tue Jan 08, 2019 5:38 pm Hi,
I am facing a strange issue in TI where FileExists function returns 1 even when the file is not present in the specified directory. It returns 1 also when the file is present.
Not sure why it is happening and it is causing TI logic to fail. Please suggest.
Thanks!
This sounds suspiciously like the code is not doing what you think it is doing. In these cases 99% of the time the code is doing exactly what it has been programmed to do, just the programmer made a mistake. We have all been there. Best to 1/ proof read the code (again) and 2/ follow bgregs suggestion. It you don't post the actual code no one can help.