FranzB 0 Posted August 6, 2020 I'm suffering some strange issue, guessing that the function fileexist will not work 100 % stable, if I check for filenames with several spaces .... filenamestr := 'my report from home.csv' if fileexists () then begin .... end else begin ..... end; on some computers, some folders, ... this seems to work, other computer and folder structure this call fails .... Share this post Link to post
Remy Lebeau 1394 Posted August 6, 2020 1 hour ago, FranzB said: on some computers, some folders, ... this seems to work, other computer and folder structure this call fails .... Are you really using a relative path to the file? Do you have the same problem when using an absolute path? 1 Share this post Link to post
FranzB 0 Posted August 6, 2020 always full path like: Quote c:\temp\user data\reports\my tiny new report.txt' variation : OS language, Computer hardware ,...... Share this post Link to post
David Heffernan 2345 Posted August 6, 2020 Doesn't seem plausible. FileExists doesn't care about spaces. You'll want to do some debugging on a machine that exhibits the behaviour. Share this post Link to post
Rollo62 536 Posted August 7, 2020 (edited) Maybe there are different kinds of spaces used (like NBSC, or other from strange Unicode char , which might be seen as different characters. Edited August 7, 2020 by Rollo62 Share this post Link to post