DirectoryWatcher.Create
-----------------------

Creates a new directory watcher.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DirectoryWatcher](component_DirectoryWatcher.md) | [7.1](newinversion71.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "DirectoryWatcher.Create" ) ### Parameters

none

### Result

Returns reference number or error.

### Description

Creates a new directory watcher.  
  
Works on server and client.  
May not work for network shared disks as most drivers don't pass through change events.  
### See also

- [DirectoryWatcher.Release](DirectoryWatcherRelease.md)

### Example Databases

- [Win Only/Directory Watcher](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Directory%20Watcher.shtml#2ScriptAnchor_)

This function checks for a license.

Created 5th March 2017 , last changed 27th February 2019

  
[DirectoryWatcher.ChangeCount](DirectoryWatcherChangeCount.md) - [DirectoryWatcher.GetEvaluate](DirectoryWatcherGetEvaluate.md)

[HTML Version](DirectoryWatcherCreate.shtml)