Folders.UserDocuments
---------------------

Queries path to user's document folder.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Folders](component_Folders.md) | [4.3](newinversion43.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Folders.UserDocuments" ) ### 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](PathNativePathToFileMakerPath.md) 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 by internally calling Get(DocumentsPath).  
### 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 " &amp; Get(RecordID)\]  
End If  
Set Variable \[$path ; Value:MBS ( "[Path.AddPathComponent](PathAddPathComponent.md)"; $folder ; Container Export::Name )\]  
Set Variable \[$r ; Value:MBS ("[Files.CreateDirectory](FilesCreateDirectory.md)"; $path )\]  
Get file in documents folder:

 Set Variable \[$folder ; Value:MBS ( "Folders.UserDocuments" )\]  
Set Variable \[$path ; Value:MBS ( "[Path.AddPathComponent](PathAddPathComponent.md)"; $folder ; "test.txt" )\]  
### See also

- [CURL.SetOptionCAInfo](CURLSetOptionCAInfo.md)
- [Files.CreateDirectory](FilesCreateDirectory.md)
- [Files.SetHidden](FilesSetHidden.md)
- [Folders.SharedDocuments](FoldersSharedDocuments.md)
- [Folders.UserFonts](FoldersUserFonts.md)
- [HadErrors](HadErrors.md)
- [Path.AddPathComponent](PathAddPathComponent.md)
- [Path.NativePathToFileMakerPath](PathNativePathToFileMakerPath.md)
- [SharingPanel.AddFilePath](SharingPanelAddFilePath.md)
- [SharingPanel.AddImageFile](SharingPanelAddImageFile.md)

### Release notes

- **Version 8.5**
    - Changed [Folders.UserDocuments](http://www.mbsplugins.eu/FoldersUserDocuments.shtml) to return FileMaker documents folder on server.
- **Version 7.5**
    - Implemented [Folders.UserDocuments](http://www.mbsplugins.eu/FoldersUserDocuments.shtml) for Linux to point to FileMaker's document folder.

### Example Databases

- [AVRecorder/AVRecorder iOS Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AVRecorder%20iOS%20Test.shtml#1ScriptAnchor_)
- [CURL/CURL with certificates included with FileMaker](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/CURL%20with%20certificates%20included%20with%20FileMaker.shtml#1ScriptAnchor_)
- [Win Only/Snippets for Windows](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Snippets%20for%20Windows.shtml#11ScriptAnchor_)

### Blog Entries

- [Use root certificates included with FileMaker](https://www.mbsplugins.de/archive/2018-11-05/Use_root_certificates_included/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr2](https://www.mbsplugins.de/archive/2018-10-12/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.5pr3](https://www.mbsplugins.de/archive/2017-10-23/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2021, Seite 21](https://filemaker-magazin.de/neuigkeit/4165-Appetithappen-FMM_202106)

This function is free to use.

Created 18th August 2014 , last changed 20th November 2024

  
[Folders.UserDesktop](FoldersUserDesktop.md) - [Folders.UserDownloads](FoldersUserDownloads.md)

[HTML Version](FoldersUserDocuments.shtml)