Pseudo code:
path = ".";
for(;;)
{
if(exist(path + "/file.exe")
break;
path += "/..";
}
basically, I have a script that is run from a folder that is a few levels deep from the folder that contains file.exe and I need to find what the path is of that folder.
For a quick workaround, I added this to my bat file:
set PATH=..;..\..;..\..\..;..\..\..\..;%PATH%
is there a proper way to iterate folders and check if a file exist in them?