Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

FindPath

  • Last UpdatedOct 29, 2026
  • 2 minute read

FindPath is a built-in function that finds a specified directory.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

FindPath

File

Synchronous

Yes

Supported

Supported

Supported

Executed on Server (see Notes below)

Supported

Syntax

FindPath(strPathName)

strPathName

The path of the directory that you want to find.

If you want to find the root directory of a drive other than drive C โ€” in other words, if you want to determine whether that drive exists โ€” you must include an asterisk (*) at the end of the file path. For more information, see "Examples" below.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

Return value

This function returns one of the following possible values:

Value

Description

0

Path not found.

1

Path found.

This function always returns 0 if the value for strPathName is the path and name of a file rather than the path of a directory. To find a file, use the FindFile function.

Notes

By default, this function is executed on the project runtime server even when it is called in a screen on a project thin client, which means it only affects directories and files that are located on the server and all paths must be specified in that context. You can change the default behavior to force this function to be executed on the client where it is called, but if you do so, you must keep in mind that the change will affect not just this function but also several other File functions. To change the behavior of these functions, use a text editor to open your project file (<project name>.app) and then edit the following property:

[Options]

ExecuteFileFunctionsOnClient=1

Examples

Find the Windows directory on drive C:

FindPath("C:\Windows")

Find the root directory of drive E:

FindPath("E:\*")

In This Topic
Related Links