BAT file to open CMD in current directory

前端 未结 17 1953
清酒与你
清酒与你 2020-12-22 18:09

I have many scripts which I interact with from the command line. Everytime I need to use them, I have to open a command line window and copy+paste and CD to the path to the

17条回答
  •  既然无缘
    2020-12-22 18:25

    Referring to answer of @Chris,

    We can also go to parent directory of batch file and run commands using following

    cd /d %~dp0..
    
    cmd.exe
    

    To understand working of command cd /d %~dp0.. please refer below link

    What does it mean by command cd /d %~dp0 in Windows

提交回复
热议问题