BAT file to open CMD in current directory

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

    Create a file named open_dos_here.cmd with the following lines:

    %~d1
    cd "%~p1"
    call cmd
    

    Put this file at any folder. Then, go to your Send To folder (Win+E; Alt+D;shell:sendto;Enter). Create a shortcut to point to this open_dos_here.cmd

    Then, in any folder, select any file or sub-folder. Right-click and select "Send To" and then select open_dos_here.cmd to open the DOS in that folder.

提交回复
热议问题