AppDir

BlitzMax Forums/BlitzMax Programming/AppDir

gellyware(Posted 2006) [#1]
I'm trying to figure out how to go 'above' the appdir get a different directory.

Example:
Appdir = C:\MyApp

I'm trying to get something like C:\SecondApp

AppDir+"../SecondApp/"

Doesn't seem to work. Any suggestions?


Gabriel(Posted 2006) [#2]
Try

AppDir+"\..\SecondApp\"


gellyware(Posted 2006) [#3]
Thanks, that did the trick :D


Grey Alien(Posted 2006) [#4]
hmm except are backslashes cross platform? I used forward slashes all through my framework and the includes work like this:

Include "../include/commoncode.bmx"

Edit: Ah I see you missed of a slash from the start so you path was c:\MyApp..\SecondApp


Gabriel(Posted 2006) [#5]
Yes sorry, I only used backslashes as they're my personal preference. The important thing was the initial slash. For whatever reason ( I'd say it's a bug personally, but that's just me ) AppDir, CurrentDir, etc do not add the slash on the end.


Fabian.(Posted 2006) [#6]
hmm except are backslashes cross platform?
Yes, they are.
BlitzMax is designed to replace all backslashes you entered to slashes, so you can surely use them.