DocumentPicker.Export
---------------------

Shows dialog to export files.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FileDialog](component_FileDialog.md) | [9.1](newinversion91.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "DocumentPicker.Export"; Paths ) 

**MBS**( **"DocumentPicker.Export";** /\* Shows dialog to export files. \*/  
**$Paths**) /\* Native file path list for the documents to pass.e.g. "/Containers/testApp/Documents/test.txt" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Paths | Native file path list for the documents to pass. | "/Containers/testApp/Documents/test.txt" |

### Result

Returns OK or error.

### Description

Shows dialog to export files.  
The user selects an external destination. The document picker copies the document, leaving the original unchanged.  
  
On success, we store the list of file paths and trigger script. Script is trigger with parameter "Pick" or "Cancel".  
The file paths refer to new copies of the exported documents at the selected destination.  
  
Warning: Function returns immediately and dialog shows after function returned asynchronously.  
### Examples

Export a temp file:

 # build a native path:   
Set Variable \[ $path ; Value: MBS ( "[Path.AddPathComponent](PathAddPathComponent.md)"; MBS ( "[Folders.UserTemporary](FoldersUserTemporary.md)" ); "test.txt") \]   
  
\# write a text file   
Set Variable \[ $r ; Value: MBS ( "[Text.WriteTextFile](TextWriteTextFile.md)"; "Hello World"; $path ; "UTF-8") \]   
  
\# and show export dialog:   
Set Variable \[ $r ; Value: MBS ( "DocumentPicker.Export"; $path ) \]  
### See also

- [DocumentPicker.Import](DocumentPickerImport.md)
- [DocumentPicker.Move](DocumentPickerMove.md)
- [DocumentPicker.Open](DocumentPickerOpen.md)
- [Folders.UserTemporary](FoldersUserTemporary.md)
- [Path.AddPathComponent](PathAddPathComponent.md)
- [Text.WriteTextFile](TextWriteTextFile.md)

This function is free to use.

Created 28th January 2019 , last changed 8th July 2020

  
[DocumentPicker.Dismiss](DocumentPickerDismiss.md) - [DocumentPicker.File](DocumentPickerFile.md)

[HTML Version](DocumentPickerExport.shtml)