Skip to content
File dialogsReference

openfilesdialog

Ask the user to select one or more existing files.

Details#

Ask the user to select one or more existing files. A 1-based array of full paths; cancellation or dialog failure returns an empty array.

Signature#

Luau
openfilesdialog(filter: string?, title: string?): {string}

Parameters#

ParameterTypeDescription
filteroptionalstringNUL-separated Windows label/pattern pairs; default All Files / *.*. Example: Text files\0*.txt\0. The implementation adds the final double NUL.
titleoptionalstringDialog title; default Open Files.

Returns#

A 1-based array of full paths; cancellation or dialog failure returns an empty array.

Examples#

Local example

Luau
local paths = openfilesdialog("Text files\0*.txt\0", "Choose notes")
print(#paths)