How do I load files from another folder?

I apologize – this is probably a very simple concept, but I just can’t seem to find the answer…

I’m still relatively new to Panda3D, and have been saving all of my programs in the same folder (Panda3D, which I have saved on my desktop) up to this point, as I’m not quite sure how to load files that are outside of the file the program itself is in. However, I usually like to organize (sometimes over-organize) my files, so I’d like to start keeping them inside of separate folders inside of my main Panda3D folder. For instance, if I have

Desktop
— Panda3D
------ File_A
------ File_B

is there any way that I could write a program in File_B, but have it load models and textures that I have stored in File_A automatically, without me needing to specify the full file path every time? Or what If I went one step further, and had another file inside of File_B? Would it still be possible to get back into File_A?

Basically, I would just like to change the path so that it starts from Panda3D, and not File_B, if that’s possible.

Thanks, and once again, I apologize for my lack of programming knowledge :wink:

EDIT: Oh, and I’m using Python. Not sure if I needed to specify that or not, but I figured it couldn’t hurt.

I think this might work: base.loader.loadModel(‘C:/Users/YOUR_NAME/Desktop/YOUR_FOLDER/YOUR_MODEL.bam’)

A warning, though: that will likely work on your machine, but if the program is installed on another machine then it will most likely break–unless they have (or create) that same directory structure (including your name).

If the program is in desktop/panda3d/file_a/main.py and a model in desktop/panda3d/file_b/model.egg then this should work:
loader.loadModel(’…/file_b/model.egg’)

You could also add your directory to the model-path with getModelPath().appendDirectory(‘egg/bacon/spam/sausage’)