relative path in BAT script

后端 未结 5 1480
囚心锁ツ
囚心锁ツ 2020-12-22 16:44

Here is my own program folder on my USB drive:

Program\\
     run.bat
     bin\\
         config.ini
         Iris.e         


        
5条回答
  •  误落风尘
    2020-12-22 17:04

    Use this in your batch file:

    %~dp0\bin\Iris.exe
    

    %~dp0 resolves to the full path of the folder in which the batch script resides.

提交回复
热议问题