Process.SetCurrentDirectory
---------------------------

Sets the current directory.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Process](component_Process.md) | [6.5](newinversion65.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Process.SetCurrentDirectory"; Path ) 

**MBS**( **"Process.SetCurrentDirectory";** /\* Sets the current directory. \*/  
**$Path**) /\* The new native path.e.g. "C:\\Test" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The new native path. | "C:\\Test" |

### Result

Returns OK or error.

### Description

Sets the current directory.  
Some OS functions look for files relative to this folder.  
  
See also [Process.SetDllDirectory](ProcessSetDllDirectory.md) for finding DLL files on Windows.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use [FileDialog](component_FileDialog.md) functions.  
For Server be aware that server has limited permissions and may not be able to access all files on a computer.  
### Examples

Set current directory:

 MBS ( "Process.SetCurrentDirectory"; "/Users/cs/Desktop" )  
Set current path on Windows:

 MBS ( "Process.SetCurrentDirectory"; "C:\\Test" )  
### See also

- [Files.CreateSymbolicLink](FilesCreateSymbolicLink.md)
- [Files.FileExists](FilesFileExists.md)
- [Llama.Backends](LlamaBackends.md)
- [Llama.LoadLibrary](LlamaLoadLibrary.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)
- [Process.GetCurrentDirectory](ProcessGetCurrentDirectory.md)
- [Python.Run](PythonRun.md)
- [Shell.GetCurrentDirectory](ShellGetCurrentDirectory.md)
- [XML.Validate](XMLValidate.md)
- [XML.ValidateFile](XMLValidateFile.md)

### Example Databases

- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Validation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Validation.shtml#1ScriptAnchor_)
- [Llama chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Llama%20chat.shtml#2ScriptAnchor_)
- [OCR/OCR with DynaPDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OCR/OCR%20with%20DynaPDF.shtml#5ScriptAnchor_)
- [OCR/OCR](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OCR/OCR.shtml#3ScriptAnchor_)
- [Saxon/Saxon ZUGFeRD Validation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Saxon/Saxon%20ZUGFeRD%20Validation.shtml#1ScriptAnchor_)

### Blog Entries

- [Validate electronic invoices with Saxon](https://www.mbsplugins.de/archive/2026-03-20/Validate_electronic_invoices_w/monkeybreadsoftware_blog_filemaker)
- [Use Llama.cpp in FileMaker](https://www.mbsplugins.de/archive/2026-02-17/Use_Llamacpp_in_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Installing and Loading Tesseract OCR with MBS Plugin](https://www.mbsplugins.de/archive/2025-10-29/Installing_and_Loading_Tessera/monkeybreadsoftware_blog_filemaker)
- [Validate electronic invoices with Saxon](https://www.mbsplugins.de/archive/2025-02-18/Validate_electronic_invoices_w/monkeybreadsoftware_blog_filemaker)
- [Validating schema for electronic invoices with ZUGFeRD](https://www.mbsplugins.de/archive/2024-10-11/Validating_schema_for_electron/monkeybreadsoftware_blog_filemaker)
- [Introducing Tesseract 4 to FileMaker](https://www.mbsplugins.de/archive/2021-06-29/Introducing_Tesseract_4_to_Fil/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.5pr6](https://www.mbsplugins.de/archive/2016-11-08/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th November 2016 , last changed 31st May 2025

  
[Process.LoadLibrary](ProcessLoadLibrary.md) - [Process.SetDllDirectory](ProcessSetDllDirectory.md)

[HTML Version](ProcessSetCurrentDirectory.shtml)