Webview.SetDefaultDownloadFolderPath
------------------------------------

Sets the default download folder path.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Webview](component_Webview.md) | [15.5](newinversion155.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Webview.SetDefaultDownloadFolderPath"; WebViewerRef; Path ) 

**MBS**( **"Webview.SetDefaultDownloadFolderPath";** /\* Sets the default download folder path. \*/  
**$WebViewerRef**; /\* Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function.e.g. "web" \*/   
**$Path**) /\* The new download folder path.e.g. C:\\Users\\Christian\\Downloads \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "[WebView.FindByName](WebViewFindByName.md)" function. | "web" |
| Path | The new download folder path. | C:\\Users\\Christian\\Downloads |

### Result

Returns OK or error.

### Description

Sets the default download folder path.  
The default value is the system default download folder path for the user. The default download folder path is persisted in the user data folder across sessions. The value should be an absolute path to a folder that the user and application can write to. Throws an exception if the value is invalid, and the default download path is not changed. Otherwise the path is changed immediately. If the directory does not yet exist, it is created at the time of the next download. If the host application does not have permission to create the directory, then the user is prompted to provide a new path through the Save As dialog. The user can override the default download folder path for a given download by choosing a different path in the Save As dialog.  
### Examples

 Set Variable \[ $r ; Value: MBS ( "Webview.SetDefaultDownloadFolderPath"; "web"; "C:\\Users\\Christian\\Downloads" ) \]  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [Webview.GetDefaultDownloadFolderPath](WebviewGetDefaultDownloadFolderPath.md)

### Release notes

- **Version 15.5**
    - Added [Webview.GetDefaultDownloadFolderPath](https://www.mbsplugins.eu/WebviewGetDefaultDownloadFolderPath.shtml) and [Webview.SetDefaultDownloadFolderPath](https://www.mbsplugins.eu/WebviewSetDefaultDownloadFolderPath.shtml) functions for Windows.

### Blog Entries

- [MBS FileMaker Plugin, version 15.5pr2](https://www.mbsplugins.de/archive/2025-10-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 1st October 2025 , last changed 16th November 2025

  
[Webview.GetProfilePath](WebviewGetProfilePath.md) - [Webview.SetPreferredColorScheme](WebviewSetPreferredColorScheme.md)

[HTML Version](WebviewSetDefaultDownloadFolderPath.shtml)