>Does anybody know how I can check programmatically if a file exists in a certain location. I have a path and file stored to a variable and i want to check if it exists. For example:
>
>C:\program files\pictures\dress.tif
>
>If this file exists in this location I want to issue a messagebox command.
>
>Any help would be greatly appreciated.
Neil, Keep in mind that If You use a FILE() function You can be confused if the file You search is placed in folder stored in SET PATH TO..., but You want to check the existing of a file in some different folder.
make a folder named TEST in C:
Place dress.tif here, and use a FILE() with path that You are shure Dress.TIF not exists.
and do:
SET PATH TO c:\test
? FILE("C:\MyDir\dress.tif")
a workaround:
m.old_path = SET("PATH")
SET PATH TO
? FILE("C:\MyDir\dress.tif")
SET PATH TO (m.old_path)
? .NOT. EMPTY(SYS(2000, "C:\MyDir\dress.tif"))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.