SourcePoint AMD Help

Table of Contents

selectfile

Open a dialog to select a file.

Syntax

[result =] selectfile([startPath])

Where:

result

specifies an nstring variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

startPath

is an nstring variable or string constant specifying the directory to begin the search in.

Discussion

The selectfile function displays the standard file open dialog to allow the user to specify a filename. ย The file can then be accessed using the standard file I/O commands.

If startPath is specified the search begins in that directory. ย If startPath is not specified the search begins in the last directory accessed.

Example

Command input:

define nstring strFile = selectfile("c:\program files")

// dialog opens, user selects a file

strFile

Result:

"C:\Program Files\test\test.dat"

Related Topics: