Skip to content

RequestFile

Claude edited this page Oct 26, 2026 · 6 revisions

RequestFile

Command Index · BlitzPlus · Dialogs

RequestFile prompt$=\  ; returns String

Works in: BlitzPlus

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.

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
Parameter Type Default Description
prompt String \

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

Differences and known gaps:

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

Related commands

Command Index · BlitzPlus · Dialogs

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally