Question

I have my .exe and three folders with it. in each folder is a .txt file that my program reads and some images to load. This was all working fine when everything was with the .exe but has stopped working now it is in folders.

I think the problem is that in folder A there is A.txt that loads A.png which is working but A.txt also loads B.png from folder B. I have put B/B.png in A.txt but I think this may be the problem.

Is the problem that I want to go up a level and then back down into another folder?

and is the a command that I can put in the pathname like upfolder/B/B.png or is the only option to put folder B in Folder A which I do not want to do.

Or if there is a better way or organising the resources by type I am open to changing.

EDIT: you ask for code but this all concerns the stuff outside the program. but il give u an example of paths I am taking about.

user/documents/map/map.txt

in that map .txt there is the line monster/yeti.txt the full path to that file is user/documents/monster/yeti.txt

How can I write the path in map.txt to come out of the map folder and into the monster folder?

Was it helpful?

Solution

I'm not 100% sure as I cannot try it out myself at the minute, but try ./ (from .exe root) or ../ (up one level).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top