Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

Folders.UserDocuments

Queries path to user's document folder.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Folders 4.3 Yes Yes Yes Yes Yes
MBS( "Folders.UserDocuments" )   More

Parameters

none

Result

Returns path or error.

Description

Queries path to user's document folder.
This is a native path. You can use Path.NativePathToFileMakerPath if you need to use path in a script step.

Version 8.5 and newer return the server documents folder for scripts running on server.

Examples

Queries path:

MBS( "Folders.UserDocuments" )

Create folder in documents:

Set Variable [$folder; Value:MBS( "Folders.UserDocuments" )]
If [IsEmpty(Container Export::Name)]
    Set Field [Container Export::Name; "Record " & Get(RecordID)]
End If
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; $folder; Container Export::Name )]
Set Variable [$r; Value:MBS("Files.CreateDirectory"; $path)]

Get file in documents folder:

Set Variable [$folder; Value:MBS( "Folders.UserDocuments" )]
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; $folder; "test.txt" )]

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 7th November 2018


Folders.UserDesktop   -   Folders.UserDownloads

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins