AVRecorder.SetFilePath
----------------------

Sets the file path for recording.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AVRecorder](component_AVRecorder.md) | [6.1](newinversion61.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "AVRecorder.SetFilePath"; AVSession; Path ) 

**MBS**( **"AVRecorder.SetFilePath";** /\* Sets the file path for recording. \*/  
**$AVSession**; /\* The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). \*/   
**$Path**) /\* File native file path.e.g. "/Users/cs/test.m4v" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). | $AVSession |
| Path | File native file path. | "/Users/cs/test.m4v" |

### Result

Returns OK or error.

### Description

Sets the file path for recording.  
Please use a native path with .avi (Windows) or .m4v (Mac) for recording.  
For Mac with audio only you can also use .m4a as extension.  
### Examples

Sets a file path:

 If \[MBS ("[SystemInfo.isMacOSX](SystemInfoisMacOSX.md)")\]  
 Set Field \[AVRecorder::FilePath ; MBS ( "[Folders.UserDesktop](FoldersUserDesktop.md)" ) &amp; "/test.m4v"\]  
Else  
 Set Field \[AVRecorder::FilePath ; MBS ( "[Folders.UserDesktop](FoldersUserDesktop.md)" ) &amp; "\\test.avi"\]  
End If  
Set Variable \[$r ; Value:MBS ("AVRecorder.SetFilePath"; AVRecorder::Session ; AVRecorder::FilePath )\]  
### See also

- [AVRecorder.GetFilePath](AVRecorderGetFilePath.md)
- [AVRecorder.Init](AVRecorderInit.md)
- [AVRecorder.StartRecording](AVRecorderStartRecording.md)
- [Folders.UserDesktop](FoldersUserDesktop.md)
- [SystemInfo.isMacOSX](SystemInfoisMacOSX.md)

### Example Databases

- [AVRecorder/AV Recorder Record Dictation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AV%20Recorder%20Record%20Dictation.shtml#1ScriptAnchor_)
- [AVRecorder/AVRecorder iOS Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AVRecorder%20iOS%20Test.shtml#2ScriptAnchor_)
- [AVRecorder/AVRecorder](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AVRecorder.shtml#2ScriptAnchor_)

This function checks for a license.

Created 9th February 2016 , last changed 17th July 2022

  
[AVRecorder.SetEncoder](AVRecorderSetEncoder.md) - [AVRecorder.SetScreenInput](AVRecorderSetScreenInput.md)

[HTML Version](AVRecorderSetFilePath.shtml)