Moving upwards on a directory


I need to move upwards on a directory 3 times. Is there a solution for this which is not hard coded like this way ?


All the best,

You could always loop it, but I don’t see that this is much more convenient (but, convenient to wrap in a function).

var path = ...; {
    path = path.dirname;

(At least this way, the number 3 is more easily variable.)

Also, appending "/.." will go up a directory level (should double check Windows, though).


1 Like

There is also a .parentLevelPath(x) in the atk quarks directory

1 Like

Thanks, this will help a lot!