我怎样才能在一个特定的位置打开一个cmd窗口,而不必一直导航到我想要的目录?


当前回答

Windows 10文件资源管理器现在有一个“快速访问工具栏”。

只需按“Alt+F”打开文件菜单,导航到“打开Windows PowerShell”菜单,右键单击并选择“添加到快速访问工具栏”:

现在你会看到一个你可以点击的小图标,它会在你所在的目录下打开PowerShell:

其他回答

这可能是你想要的:

cmd /K "cd C:\Windows\"

注意,为了改变驱动器号,您需要使用cd /d。例如:

C:\Windows\System32\cmd.exe /K "cd /d H:\Python\"

(文档)

使用/K开关。例如

cmd /K "cd /d c:\WINDOWS\"

将创建一个cmd窗口在C:\Windows目录

如果您使用的是Windows Vista或更高版本,请按住Shift键右键单击资源管理器中的文件夹图标,然后单击“在此打开命令窗口”或“在此打开PowerShell窗口”上下文菜单选项。

如果你已经在你想要的文件夹中,你可以执行以下操作之一:

[only Win8+] Click the Explorer Ribbon's File button, then click on "Open command window here" or "Open PowerShell window here". Shift-right-click on the background of the Explorer window, then click on "Open command window here" or "Open PowerShell window here". (recommended by Kate in the comments) [only Vista or Win7] Hold down Shift when opening the Explorer File menu, then click on "Open command window here". If you can't see the menu bar, open the File menu by pressing Alt-Shift-F - Alt-F to open the File menu, plus Shift.

对于Windows XP,使用dF提到的PowerToy来获得相同的功能。

最简单的方法是进入Windows资源管理器的地址栏,在那里输入cmd。它将自动为您打开命令提示窗口。

在Windows下到特定的文件夹,然后单击文件资源管理器路径并删除它,然后键入cmd并单击enter..在CMD中,您的特定文件夹及其路径将打开..