LogiView

Function 'file_choose'

     

Use this function to select a file from the local file system of a client computer. The corresponding selection widget is opened. The result is TRUE if the user has selected a file or FALSE if the user has canceled the selection.

It is not possible to access the function in alphanumeric mode. It can only be used in conjunction with the client (GUI).
 

Syntax:

  {LOG_VAR}= file_choose ({STR_VAR},{STR_EXPR},{STR_EXPR})
 

I/O parameters:

{STR_EXPR} Name of directory
{STR_EXPR} File name filter and additional options; syntax "filter /FILE=file /TITLE=title" with:
filter

optional file name filter [default *.*]

Several file types may be set in one file name filter. Use a semicolon to separate file names.
Example: "*.txt;*log" will display files of type "*.txt" and ".log" in the user selection.

Additionally, you may add alternative file types, which can be selected in the file selection box from a menu. Use a '+' to combine several file types.

E.g. "*.log;*.txt+*.prt" produces a selection menu containing files of type "*.log" and "*.txt" or alternatively files of type "*.prt".

/FILE=file

Definition of default file name. Several files may be selected if a string starting with a '*' is passed on as the default file name. The names of the files are returned separated by comma (and can be split with the Scan function).

If the default file name is '*.dir', users may select a directory instead of a file.

/TITLE=title Optional selection of a selection widget title.
/TYPE=type

Option to set type for selection dialogue.

save A "save" dialogue (with button "save") is opened
open An "open" dialogue (with button "open") is opened. You can choose existing files only.

Default is open, if option /TYPE is not used.

{STR_VAR} Variable of type STRING to be initialized with the complete name of a selected file(s).
 

Return value:

 
{LOG_VAR}
TRUE No file was selected.
FALSE Cancel
 

Example:

  Declaration of Variables
 
10 DOCU_LOGIC_1=file_choose(DOCU_STRING_1,"C:\temp","*.log;*.html+*.tmp")
 

Result:

Functions and commands: File Interface