Resolve absolute path from relative path and/or file name

前端 未结 14 1791
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 09:38

Is there a way in a Windows batch script to return an absolute path from a value containing a filename and/or relative path?

Given:

         


        
14条回答
  •  误落风尘
    2020-11-27 10:20

    Files See all other answers

    Directories

    With .. being your relative path, and assuming you are currently in D:\Projects\EditorProject:

    cd .. & cd & cd EditorProject (the relative path)

    returns absolute path e.g.

    D:\Projects

提交回复
热议问题