Access to folder above main scriptI am currently using the Get Default Directory function to run a script in a subfolder of my main script, using the following code
relativePath = Get Default Directory();
Include(relativePath || "Folder1/Data import.jsl");
How can I run a script or open a file in a folder above my main script, i.e. in a directory higher than the full directory given by Get Default Directory function?
Automation and ScriptingRe: Access to folder above main scriptThis should work for you.
Names Default To Here( 1 );
relativePath = Get Default Directory();
UPone = Left( relativePath, Contains( relativePath, "/", -2 ) );
Re: Access to folder above main scriptThanks for the reply @mmarchandTSI !
This takes me one level up, but what if I need two levels up?
Re: Access to folder above main scriptrelativePath = Get Default Directory();
UPtwo = Left( relativePath, Contains( relativePath, "/Folder1/", -2 ) );
Thanks again @mmarchandTSI, I solved it with the above code.