Purpose
Returns a string containing the path from which the current MapBasic application is executing. You can call this function from the MapBasic window in MapInfo Pro.
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 Pro 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: