OpenFileRequester()

Syntax

FileName$ = OpenFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)

Description

Open the standard requester which allow to choose a file. The title can be specified to replace the default one. The DefaultFile$ is useful to initialise the requester in the right directory and with the right filename.

The Pattern is a standard filter which allow to display only the files which end with such or such extension. It must be in the following form : "Texte file | *.txt | Music file | *.mus;*.mod" The pattern always work by pair: name (which really appears in the filter) and extention (ie: *.txt). Several extensions can be specified for a single type by using the ; (semi-colon) separator.

Finally 'PatternPosition' specifies which pattern must be the default. It begin to 0 up to the number of pattern.

The returned 'FileName$' can be easely splitted into file, path and extension string with the following functions: GetFilePart(), GetPathPart() and GetExtensionPart().

Supported OS

Windows, AmigaOS, Linux

Requester - Index