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

Edge HMI

RDFileN

  • Last UpdatedOct 29, 2026
  • 2 minute read

Launches a File Browser window allowing you to select a file.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

RDFileN

File

Synchronous

No

Supported

Supported

Not supported

Executed on Server (see Notes below)

Not supported

Syntax

RDFileN( "tagSelectedFile", strSearchPath, strMask, optNumChangeDir )

tagSelectedFile

Name of the string tag receiving the name and path of a selected file. The tag name must be enclosed in quotes, or the project will try to get the contents of the tag. Moreover, it must be a valid tag name — it cannot be a VBScript variable name, for example.

strSearchPath

The file path (directory) to search.

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).

strMask

The mask used to filter the files.

optNumChangeDir

Optional numeric tag that indicates whether the operator will be able to change the browsing directory. If this parameter is omitted or set TRUE ( 1 ), then the window opened by this function will allow the operator to navigate to different directories. If it is set FALSE ( 0 ), then the window will be restricted to the directory specified by strSearchPath.

Returned value

0

Success

1

One of the parameters is not a string

2

Parameter 1 contains an invalid tag name

3

The user canceled the operation

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

Tag Name

Expression

Tag

RDFileN( "FileName", "C:\Studio\", "*.doc", 1 )

In This Topic
Related Links