Files.ItemExists
----------------

Checks whether a item exists with the given path.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Files](component_Files.md) | [2.7](newinversion27.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Files.ItemExists"; Path ) 

**MBS**( **"Files.ItemExists";** /\* Checks whether a item exists with the given path. \*/  
**$Path**) /\* Native path to the item to check.e.g. "C:\\Windows" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | Native path to the item to check. | "C:\\Windows" |

### Result

Returns 1 if item exists and 0 if not.

### Description

Checks whether a item exists with the given path.  
If item exists at the path Files.itemExists returns 1. If it's a directory, [Files.DirectoryExists](FilesDirectoryExists.md) also returns 1 and [Files.FileExists](FilesFileExists.md) returns 0. With a file, [Files.FileExists](FilesFileExists.md) returns 1 and [Files.DirectoryExists](FilesDirectoryExists.md) returns 0.  
This function needs a native path. Please use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) function in order to convert a FileMaker style path to a native path.  
### Examples

Checks whether item exists:

 Set Variable \[$r ; Value:MBS ( "Files.ItemExists"; "/Users/cs/Desktop/test.rtf")\]  
### See also

- [Files.DirectoryExists](FilesDirectoryExists.md)
- [Files.FileExists](FilesFileExists.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Example Databases

- [Files/File Exists](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Files/File%20Exists.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS Plugin Advent calendar: 12 - Files](https://www.mbsplugins.de/archive/2023-12-12/MBS_Plugin_Advent_calendar_12_/monkeybreadsoftware_blog_filemaker)
- [FileMaker 18 File Script Steps vs. BinaryFile functions](https://www.mbsplugins.de/archive/2019-06-03/FileMaker_18_File_Script_Steps/monkeybreadsoftware_blog_filemaker)
- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.1pr3](https://www.mbsplugins.de/archive/2014-03-04/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.7fc](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin 2.7 Release notes](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_27_Releas/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.7pr2](https://www.mbsplugins.de/archive/2012-04-04/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 18th October 2016

  
[Files.IsUserImmutable](FilesIsUserImmutable.md) - [Files.Launch](FilesLaunch.md)

[HTML Version](FilesItemExists.shtml)