Skip to content

RequestDir

Narta Xaymar Dirks edited this page Oct 31, 2026 · 6 revisions
BlitzPlus

RequestDir

RequestDir:String prompt:String=\
Parameter Mode Type Default Description
prompt In String \ Text for the title of the dialog. Defaults to an empty string.

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

Description

Opens the folder picker of the system and gives the folder that was chosen, or an empty string if the user cancelled.

Differences

  • It is the folder dialog of the operating system, in front of the program's active window, which differs between Windows, macOS and Linux. The prompt is the title, not text inside the dialog. Without a desktop session that can show one it returns an empty string.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Folders", 20, 20, 260, 100, Desktop(), 3)
dir$ = RequestDir("Pick a folder", CurrentDir$())
If dir$ <> "" Then SetGadgetText win, dir$
Repeat
Until WaitEvent() = $803

Related Commands

RequestColor, RequestedBlue, RequestFile, RequestFont

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally