I am working through the AHK docs but am having a hard time finding a fairly simple way to find the path to a target file in a parent directory, given a starting directory.
For example:
Starting in C:\a\b\c\d\e\f\g\
I want to find the path of root.txt where:
C:\a\b\c\root.txt
I want to return C:\a\b\c\
[by the way I do not know where root.txt lives]
I would make a loop and add “..\” to the current directory path each time.
It works in autohotkey, i always use it.
For example, I have my scripts in one directory, and images in another on the same level.
So my images paths are always: