Finding out the file name of the running batch file

前端 未结 5 1935
萌比男神i
萌比男神i 2020-12-05 05:05

Inside a windows batch file I\'d like to figure out what the fully qualified path name of this batch file is.

I have tried %0 but this does only gave me

5条回答
  •  天涯浪人
    2020-12-05 05:27

    %~f0
    
    %~dpnx0
    

    Either of the above gives the fully-qualified path. Enclose it in double quotes in case the path contains spaces.

提交回复
热议问题