Can I get a folder up hierarchy relative to the dataPath?

So I have something like this:

var mpDataPath = Application.dataPath;
var files = Directory.GetFiles(mpDataPath);

but I'd like to NOT have my data files in Assets at runtime (the keep getting imported into Unity authoring) and NOT in my _Data folder at runtime, but maybe up one level.

Are there any symbols I can use to indicate "up one folder level"?

Does Unity allow this if I for example just edit the dataPath string to represent the folder up one level.

My folders might be look this:

  data files...

Even better than a symbol, the "Directory" class has a function to do just this called "Parent". Check it out on MSDN here.

And to get a fuller understanding of the use of files and paths in unity, using .net's FileIO, check out these pages:

(even if you're using javascript, the c# reference will be useful, since all the functions and variable names for the .net classes are exactly the same!)

If you want to use symbols, ../ is the usual way.

var oneLevelUp = Application.dataPath + "/../";
var dirInfo = new System.IO.DirectoryInfo(oneLevelUp).GetFiles();
for (fileName in dirInfo) {
    print (fileName);

This is a horrible hack but it works. At least from run mode in the IDE...

using UnityEngine;
using System.Collections;
using System.IO;

public class TestPath : MonoBehaviour {

    // Use this for initialization
    void Start () {
        string assetsPath = Application.dataPath;
        string configPath = assetsPath.Substring(0,assetsPath.LastIndexOf('/')) + "/config";
        string[] files;
        string input;
        StreamReader reader;

        files = Directory.GetFiles(configPath);

        foreach (string fileName in files)
            reader = File.OpenText(fileName);
            while ((input = reader.ReadLine()) != null)
            reader.Close() ;


    // Update is called once per frame
    void Update () {


Not the exact answer, but related, I recently found the Path class in Unity which has functions for manipulating paths like GetDirectoryName, GetFileName.

We use a centralized point for gameLogic so we put an .exe outside assets folder. The hierarchy is as follows:

(Assets): D:/Projects/ProjectName/Assets

(GameLogic): D/Projects/ProjectName/offline

(Database): D:/Projects/ProjectName/offline/db

Here is the code to fetch the desired .exe relative to assets

void Start()
void StartServerProcess()
      var stringPath = Application.dataPath + "/../offline/";
      string directory = Path.GetFullPath(stringPath);
      var myProcess = new System.Diagnostics.Process();
      myProcess.StartInfo.WorkingDirectory = directory;
      myProcess.StartInfo.FileName = "offline.exe";

What I would use is Path.GetDirectoryName(Application.dataPath)