Search code examples
batch-filecall

How to call a batch file that is one level up from the current batch file directory?


I'm using a batch file in folder1\folder2\file.bat.

There is a batch file in parent folder folder1 that I want to open through file.bat.

I have tried using:

start ..\..\code.bat

But this results in an error message because the file couldn't be found.

Any ideas?


Solution

  • You could just:

    cd..
    start Code.bat
    

    And that would start code.bat from its own directory