BAT file to open CMD in current directory

前端 未结 17 1994
清酒与你
清酒与你 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:37

    you probably want to do this:

    cd /d %~dp0
    cmd.exe
    

    this will set your current directory to the directory you have the batch file in

提交回复
热议问题