Windows下更高效的打开你的命令行
[08-23 23:18:57] 来源:http://www.duoxue8.com 电脑技巧 阅读:846次
Windows下更高效的打开你的命令行,标签:电脑技巧大全,电脑基础知识,http://www.duoxue8.com
正常情况下我门需要打开CMD, 然后再CD到自己需要的目录, 这对偶尔用用的人倒没什么. 但是经常需要这么些操作就感到浪费了大把时间. 现在提供两种电脑小技巧让你像在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
full_path = %word_array1%
; strip to bare address
full_path := RegExReplace(full_path, “地址: “, “”)
; Just in case – remove all carriage returns (`r)
StringReplace, full_path, full_path, `r, , all
IfInString full_path, \
{
Run, cmd /K cd /D “%full_path%”
}
else
{
Run, cmd /K cd /D “C:\ ”
}
}
把上面代码存为UTF-8编码格式(因为有中文)的ahk格式,用Autohotkey打开,然后按win键+C就可以在当前目录下打开cmd命令行了.
这段小代码肯能有两个你需要修改的地方
1. #c:: 中的#代表win键, 这个代码中使用的是win键+C, C可以改成你需要的其它键
2. 如果你的系统是英文的,你需要把”地址: ” 改为 “^Address: “
本文来自 www.duoxue8.com f="http://www.duoxue8.com">http://www.duoxue8.com 谢谢支
Windows下更高效的打开你的命令行 结束。
正常情况下我门需要打开CMD, 然后再CD到自己需要的目录, 这对偶尔用用的人倒没什么. 但是经常需要这么些操作就感到浪费了大把时间. 现在提供两种电脑小技巧让你像在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
full_path = %word_array1%
; strip to bare address
full_path := RegExReplace(full_path, “地址: “, “”)
; Just in case – remove all carriage returns (`r)
StringReplace, full_path, full_path, `r, , all
IfInString full_path, \
{
Run, cmd /K cd /D “%full_path%”
}
else
{
Run, cmd /K cd /D “C:\ ”
}
}
把上面代码存为UTF-8编码格式(因为有中文)的ahk格式,用Autohotkey打开,然后按win键+C就可以在当前目录下打开cmd命令行了.
这段小代码肯能有两个你需要修改的地方
1. #c:: 中的#代表win键, 这个代码中使用的是win键+C, C可以改成你需要的其它键
2. 如果你的系统是英文的,你需要把”地址: ” 改为 “^Address: “
本文来自 www.duoxue8.com f="http://www.duoxue8.com">http://www.duoxue8.com 谢谢支
Windows下更高效的打开你的命令行 结束。
Tag:电脑技巧,电脑技巧大全,电脑基础知识,电脑学习 - 电脑技巧
Windows下更高效的打开你的命令行相关文章
- ·上一个:怎样防止打印信封时打偏
- Windows下更高效的打开你的命令行
- › WindowsXP的网桥功能
- › Windows文件恢复技巧:误删文件的恢复
- › Windows 7操作系统中轻松搞定无法删除文件
- › 解决Windows 7系统的四大热门问题
- › 解决Windows 7一段时间后激活状态无效问题
- › Windows 7下DVD光驱无法使用的解决
- › 电脑技巧-用空格键调用Windows7启动管理器
- › Windows 7加密文件夹
- › 非主流秘籍:关闭Windows窗口的神奇快捷键
- › 解决Windows7下WinAPN无法连接网络的问题
- › 怎样加快Windows 7关机速度
- › Windows 7系统ADSL拨号出现本地连接显示未识别
- 在百度中搜索相关文章:Windows下更高效的打开你的命令行
- 在谷歌中搜索相关文章:Windows下更高效的打开你的命令行
- 在soso中搜索相关文章:Windows下更高效的打开你的命令行
- 在搜狗中搜索相关文章:Windows下更高效的打开你的命令行