'fileexists' function behavior

The original MacOS had a great system of type and creator codes that would keep track of what applications should be launched when a file was double clicked and for allowing applications to figure out what documents they could open. This system was light years ahead of other systems like DOS, UNIX, etc.

When the NeXT people took over Apple, they brought a lot of great stuff. But not everything they did was good. For some reason, they decided to get rid of type and creator codes and go back to the more primitive extension system used by UNIX. Many people have bemoaned this change over the past 15 years, but clearly it is a permanent change, so we just have to live with it.

It does make it easier to share files and folders between Macs and Windows/UNIX systems. In fact, I think that may have been the motivation. Back in the late 90’s when this decision was made, Apple was nearly disappearing, so I think they made this change to fit in with the more popular systems out there.

And look at them now!!!

This is my Panorama 6 code:

local FileName1, FileName2
FileName1 =  info("databasename") 
FileName2 = replace(FileName1,"Base1","Base2")
If FileExists("",FileName2) = 0
    RtnError "There is no matching file, " + FileName2
EndIf

which didn’t “see” FileName2 in Panorama X.

Yes, but undoubtably your database filename had no extension. Hence no extension is needed.

In this particular example, however, your code isn’t really correct. Instead of using

info("databasename")

you should use

info("databasefilename")

This works in both Panorama 6 and X, and will return the database name with the extension, if there is one.

I think this subject has been beaten to death at this point. Bottom line, fileexists( works correctly, and it works the same as it did in Panorama 6. Let’s close this topic.