I tried using this code to get the path to the executable.
It works if the application is Launched from the folder that contains the executable but does not work when the application is launched from a different directory using a path to the executable.
Current working directory (depends on the location of the application). When run from Xojo, it is the path to Xojo. In a built app, it is the path to the built app.
[code] Dim f As FolderItem
f = SpecialFolder.CurrentWorkingDirectory
respath = f.ShellPath + “/” + “myResource/”
If f <> Nil Then
System.DebugLog("This is the path to my: " + respath)
Else
System.DebugLog(“Unable to get current working directory.”)
End If
[/code]
Basically it is what it says it is… the current working directort.
The directory from which the application was launched from, but it is not the path to the application.
I have some resources and I need the path to them which is relative to the application executable.
I can’t seen to find this special folder in the list of special folders.