Such a thing: I can get the path from which the Bat file was launched (% ~ dp0). Is it possible to somehow quickly and easily get a way, for example, two levels higher?

Example:

From

D:\AutoBuilder\Project\Source\Build 

Before

 D:\AutoBuilder\Project 

Maybe something like:

 ..\..\$(%~dp0) 

    1 answer 1

    Maybe something like: .... \ $ (% ~ dp0)

    Nearly. Try:

     %~dp0..\..\ 
    • Does not work. Issues: D: \ AutoBuilder \ Project \ Source \ Build .. \ .. \ - Sergey
    • one
      It was wrong, it just does not change this parameter, therefore it does not output a new path to echo, and if you navigate through the cd command, everything is fine. - Sergey