设置CMD 在指定目录打开
来源:互联网 发布:现代文转换文言文软件 编辑:程序博客网 时间:2024/05/14 13:53
学习本文章可以获知:
1.如何在指定目录下打开cmd
2.存在强大的快捷键工具Auothotkey
此文仅限於对经常需要打开命令行并且感到正常打开命令行方式很浪费时间的人. 正常情况下我门需要打开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: 「此文仅限於对经常需要打开命令行并且感到正常打开命令行方式很浪费时间的人. 正常情况下我门需要打开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: 「
【转自】http://zhidao.baidu.com/question/351442826.html
- 设置CMD 在指定目录打开
- ubuntu在当前目录打开cmd
- 在当前目录下打开命令行 CMD
- 在当前目录下 打开cmd
- 如何让CMD命令提示符打开后到指定目录
- 怎么在cmd中进入指定的目录
- 使用AutoHotkey在当前目录打开命令行(cmd.exe)
- Windows在当前目录(文件)打开cmd窗口
- Windows 7中快速在当前目录打开cmd
- win7右键在目录当前打开命令cmd窗口
- win7右键在目录当前打开命令cmd窗口
- win7右键在目录当前打开命令cmd窗口
- win7右键在目录当前打开命令cmd窗口
- win7右键在目录当前打开命令cmd窗口
- win7下在当前目录下打开cmd命令窗口
- 使用AutoHotkey在当前目录打开命令行(cmd.exe)
- 如何在当前目录下快速打开cmd
- 如何在文件夹空白处打开当前目录的 CMD
- iOS 图片与内存
- MyEclipse10.0 安装 SVN插件
- RMXP教程3-4
- android 电源管理
- 精美到无可挑剔的几首古典音乐
- 设置CMD 在指定目录打开
- C、C++、java分析
- ® 汉语是世界上唯一一种面向对象的高级语言
- 抽象工厂模式适用环境
- 将数据导出到excel文件的操作类(用法大全)
- 视野检测
- 怎样向eclipse 增加项目。
- Java:5大常用混淆器总结
- AOE网中关键路径的一般求法