Problems with directory

BlitzPlus Forums/BlitzPlus Programming/Problems with directory

Regular K(Posted 2005) [#1]
Im using these INI functions http://www.blitzbasic.com/codearcs/codearcs.php?code=1260

the actual functions work fine, except, it demands the full path! and, SystemProperty("appdir") gives C:\Program Files\BlitzPlus..., that, isnt where the file is located.

The question is: how can I find out the directory that the actual BB file is being executed from or exe (if compiled)

SystemProperty("appdir") technically gives the correct directory, but, its not the one I want for testing purposes, in the end, once I compile the project, I can use that, but until then, I cant.


Snarkbait(Posted 2005) [#2]
CurrentDir$() ?


Blaine(Posted 2005) [#3]
Insert the following code at the beginning of you program:
Const ProgDir$=CurrentDir$()
Then you can use the "ProgDir" constant to get the program's directory any time you want.


Regular K(Posted 2005) [#4]
Ah, im so stupid! I was looking for another function similiar to SystemProperty("appdir"), but I never bothered to look past System in the manual.

Thank you for answering my stupid question.