Refer to Parent Directory

This forum is currently in read-only mode.
  • Good morning,

    I searched a bit and didn't see an answer to this, so I'm wondering if it's possible. I'm planning for my project to have an "episodic" structure, where there is a main executable folder, and separate episodes that are self-contained in their own subdirectories. I'm wondering if there is a way to refer to a PARENT directory above the current AppPath. For instance, I have a BGM folder for music files that includes music which would be common to several episodes, so I would like to have my XAudio2 object refer back up a level to the "main" BGM folder instead of having repetitive files in each episode's own subdirectories. Since they're OGG files, I'm keeping them external and playing them through channels rather than importing them. I tried using "..\" as a blind guess, and it didn't seem to work. So is it a possibility?

  • Using "../" will take you back a folder. I just tested it, so it should work.

  • Forward slash. I am a moron. Thank you!

    (Edit) Also it would help if I were backing out far enough in the first place.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You're meant to use backslashes for local directories, but I think Windows replaces / with \ just in case you got it wrong.

  • Yes, they're interchangeable it seems, I was just forgetting a level so I actually needed "..\..\" instead. At least I was on the right track!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)