且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

BAT文件在当前目录中打开CMD

更新时间:2023-01-28 08:09:50

使用以下行创建名为 open_dos_here.cmd 的文件:

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

%~d1
cd "%~p1"
call cmd

将此文件放在任何文件夹。
然后,转到您的发送到文件夹( Win + E ; Alt + D ; shell:sendto ; 输入)。
创建一个指向此open_dos_here.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

然后,在任何文件夹中,选择任何文件或子文件夹。右键单击并选择发送到,然后选择 open_dos_here.cmd 以打开该文件夹中的DOS。

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.