# File/folder exists

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-16fe17ef234f0a75f66653bd0d591d691075f801%2Fimage%20\(21\).png?alt=media)

Element that checks for a file or folder

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-28e81000505e5448d40f2ff427fd8c071ebe0c37%2F1%20\(72\).png?alt=media)

Properties

\- Path\*: \[String] Path to a verifiable entity (c:\folder\file.txt)

\- Variable\*: \[Boolean] Variable being a test result receiver

\- Search for a folder: \[Boolean] Folder search sign

```
C#
bool f = System.IO.File.Exists(@"C:\text.txt");
bool d = System.IO.Directory.Exists(@"C:\Dir");

Python
f = System.IO.File.Exists("C:\\text.txt")
d = System.IO.Directory.Exists("C:\\Dir")

JavaScript
var f = _lib.System.IO.File.Exists("C:\\text.txt");
var d = _lib.System.IO.Directory.Exists("C:\\Dir");
```
