Loop over folder string and parse out last folder name

后端 未结 13 1444
-上瘾入骨i
-上瘾入骨i 2020-12-03 05:39

I need to grab the folder name of a currently executing batch file. I have been trying to loop over the current directory using the following syntax (which is wrong at prese

13条回答
  •  时光取名叫无心
    2020-12-03 06:16

    In batch files in the FOR command you'll need to prepend %whatever with an extra % (e.g. %%whatever).

    'echo %~p0' will print the currently directory of the batch file.

提交回复
热议问题