Xbasic

FILENAME_ABSOLUTE Function

Syntax

Fully_Qualified_Filename as C = filename_absolute(C filename [,C reference_path ])

Arguments

filename

A relative path to the file. If NULL, the current database path is assumed.

reference_path

Optional. Default = path of current database. A path to use as a starting point in composing the absolute filename.

Description

Converts a relative filename into an absolute filename. If reference_path is blank, assume current database path.

FILENAME_ABSOLUTE() returns a character string after converting a relative filename into an fully qualified filename. In the following example, the database path is "C:\Databases\Functions".

 Example

dim cs as C
cs = filename_absolute("input_data.txt")
cs   ->"C:\Databases\Functions\input_data.txt"
cs = filename_absolute("input_data.txt", "c:\Databases")
cs   -> "c:\Databases\input_data.txt"

See Also