Product: MapBasic
Version: 7.x
Platform: 98/NT 4.0 SP6/2000/XP
Category: Documentation
Summary:
ApplicationDirectory$() Function - Description.
Question:
What is the ApplicationDirectory$() function?
Answer:
Purpose
Returns a string containing the path from which the current MapBasic application is executing.
Syntax
ApplicationDirectory$( )
Return Value
String expression, representing a directory path.
Description
By calling the ApplicationDirectory$( ) function from within a compiled MapBasic application, you can determine the directory or folder from which the application is running. If no application is running (e.g. if you call the function by typing into the MapBasic window), ApplicationDirectory$( ) returns a null string.
To determine the directory or folder where the MapInfo software is installed, call the ProgramDirectory$( ) function.
Example
Dim sAppPath As String
sAppPath = ApplicationDirectory$()
' At this point, sAppPath might look like this:
'
' "C:\MAPBASIC\CODE\"
See Also
File and directory names
Last Modified:
|