Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3    Statistic  


Queries list of file names in folder.

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

MBS( "Files.List"; Path { ; filter; ExtensionFilter } )


Parameter Description Example value
Path Native path to the directory. "C:\Test"
filter Optional
Optional, limits what is returned. Default is 0 to report all files. Pass a combination of 1 for showing only files, 2 for showing only directories and 4 for showing only visible items.
ExtensionFilter Optional
Optional, a filter for getting only files with matching file extension.


Returns list of files separated by return.


Queries list of file names in folder.
The list of names is separated by new line character.
This function needs a native path. Please use Path.FileMakerPathToNativePath function in order to convert a FileMaker style path to a native path.
With filter parameter being 8 on Windows, you can pass a path with wildcards directly and ExtensionFilter parameter is ignored. This is not supported on Mac OS X.

See also Files.ListRecursive.


Queries files in Users folder on Mac:

$files = MBS("Files.List"; "/Users")

Queries visible files in windows folder:

$files = MBS("Files.List"; "c:\\Windows\\"; 5)

Queries DLL files in windows folder:

$files = MBS("Files.List"; "c:\\Windows\\"; 0; ".dll")

Queries Applications with name starting with e in windows folder:

$files = MBS("Files.List"; "c:\\Windows\\e*.exe"; 8)

Find FileMaker databases in a folder:

MBS("Files.List"; "c:\\Users\\Christian\\Desktop"; 0; ".fmp12")

See also

Files.LaunchFile   -   Files.ListRecursive

Feedback: Report problem or ask question.

MBS Real Studio Plugins - Pfarrgemeinde Messdiener Nickenich