分享两方式让你的命令行运行更高效。

nnthf 409 0

图形化界面和鼠标点击操作早已占据主导的如今,微软仍旧保留命令行模式就证明它还有用武之地,事实上也正是如此,有时候一条命令可以简化很多步操作。今天小编就给大家讲解Windows下如何更高效的打开你的命令行,现在提供两种方式让你像在linux中那样更高效的在当前目录打开命令行.

方式一:

在当前目录按Shift+鼠标右键, 你就可以看到类似的在此处打开命令行的选项了, 如果你想去掉shift,直接按鼠标右键就有此选项, 那么你需要用简单的修改下你的注册表,

去注册表位置HKEY_CLASSES_ROOT\Directory\shell\cmd 下面将Extended键值删掉, 如果你还希望驱动器和桌面也能这样, 将HKEY_CLASSES_ROOT\Driver\shell\cmd和

HKEY_CLASSES_ROOT\Directory\Background\shell\cmd 下的Extended键值去掉即可.

  方式二:

用快捷键,当然会用到人见人爱的Autohotkey. 其Auothotkey代码如下:

SetTitleMatchMode RegEx

return

; Stuff to do when Windows Explorer is open

;

#IfWinActive ahk_class ExploreWClass|CabinetWClass

; open ‘cmd’ in the current directory

;

#c::

OpenCmdInCurrent()

return

#IfWinActive

; Opens the command shell ‘cmd’ in the directory browsed in Explorer.

; Note: expecting to be run when the active window is Explorer.

;

OpenCmdInCurrent()

{

; This is required to get the full path of the file from the address bar

WinGetText, full_path, A

; Split on newline (`n)

StringSplit, word_array, full_path, `n

; Take the first element from the array

标签: #高效 #命令行 #方式