Skip to content

RequestFile

Claude edited this page Oct 27, 2026 · 6 revisions
BlitzPlus

RequestFile

RequestFile:String prompt:String=\
Parameter Type Default Description
prompt String \

Returns: The full path of the file, or an empty string if nothing was picked.

Description

Opens the file picker of the system and gives the file that was chosen, or an empty string if the user cancelled. Pass a list of extensions to show only those files. With the save flag the dialog is for naming a file that may not exist yet.

The extension list is separated by commas, and a ; splits it into groups: "bb,bmx;*.txt" offers the types bb and bmx together, and txt next to them.

Differences

  • It is the file dialog of the operating system, so it looks different on each system. The list of extensions is shown as one filter named "Files", groups with ; are merged into it.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Files", 20, 20, 260, 100, Desktop(), 3)
file$ = RequestFile("Open a picture", "png,jpg,bmp")
If file$ <> "" Then SetGadgetText win, file$
Repeat
Until WaitEvent() = $803

Related Commands

RequestColor, RequestDir, RequestedGreen, RequestFont

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally