Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  


Checks whether a file exists with the given path.

Component: Files
Version: 2.7
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "Files.FileExists"; Path )


Parameter Description Example value
Path Native path to the file to check. "C:\Windows"


Returns 1 if file exists and 0 if not.


Checks whether a file exists with the given path.
If item exists at the path Files.ItemExists returns 1. If it's a directory, Files.DirectoryExists also returns 1 and Files.FileExists returns 0. With a file, Files.FileExists returns 1 and Files.DirectoryExists returns 0.
This function needs a native path. Please use Path.FileMakerPathToNativePath function in order to convert a FileMaker style path to a native path.

For applications on Mac OS X, this function returns 0 as those are directories.


Checks whether file exists:

Set Variable [$r; Value:MBS( "Files.FileExists"; "/Users/cs/Desktop/test.rtf")]

See also

Files.FileDisplayName   -   Files.FileExtension

Feedback: Report problem or ask question.

MBS Real Studio Plugins - Pfarrgemeinde Messdiener Nickenich