Purpose
Returns a full file specification, given a partial specification. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
TrueFileName$( file_spec )
file_spec is a string representing a partial file specification (for example, "C:PARCELS.TAB")
Description
This function returns a full file specification (including full drive name and full directory name), given a partial specification.
In some circumstances, you may need to process a partial file specification. For example, on a DOS system, the following file specification is partial (it includes a drive letter, C:, but it omits the current directory name):
"C:parcels.tab"
If the current directory on drive C: is "\mapinfo\data" then the following function call:
TrueFileName$("C:parcels.tab")
returns the string:
"C:\mapinfo\data\parcels.tab"
If your application prompts the user to type in the name of a hard drive or file path, you may want to use TrueFileName$() to expand the path entered by the user into a full path.
The TrueFileName$() function does not verify the existence of the named file; it merely expands the partial drive letter and directory path. To determine whether a file exists, use the FileExists() function.
See Also:
ProgramDirectory$() function