|
以前在xp下的cmd可以将文件拖拽进来,但是在vista下, 我发现了一个很恶心的“new feature”,就是居然把这个功能去掉了。如果要获得一个文件的完整路径总是得手动通过“重命名”将文件名复制取出来,再拿到地址栏和那个路劲拼起 来, 如果是长文件名的话还要注意左右都加上个"符号,真的是相当的烦……
不过我相信微软不会这么无耻下贱的,于是google一番,发现到了很多人和我一样抱怨的帖子,也从那些帖子里才发现,原来居然有个隐藏指令,可以很方便的复制一个文件完整路径到剪贴板, 这样也算是弥补了不能拖拽文件到cmd的缺陷吧。
操作很简单: 就是 先按住SHIFT,然后鼠标右键一个文件的时候,菜单里面会多出个“复制为路径”。 这样就可以将这个文件的完整路径的text复制出来
===================无聊的分割线=====================
然后百度了下,原来介绍这个技巧的文章很泛滥。哎,惭愧。 如果你没发现你的右键菜单里面有多出个“复制为路径”,那么你的系统就是?我说的是VISTA~~~~~(难道你在XP下照着操作了^_!)
不过我觉得我很多时候用xp时, 也很需要这个特性, 于是在google上也发现了可以简单实现的方法。原文:http://www.winhelponline.com/blog/add-copy-as-path-option-to-the-context-menu-in-windows-xp/
第一,下载微软一个小程序:(不到6K)ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/FILE/CLIP.EXE
第二,将下面的内容保存为copypath.vbs
| 以下是代码片段: Set WshShell = WScript.CreateObject("WScript.Shell") strMsg = "Completed!" & Chr(10) & Chr(10) & "CopyPath.vbs - ?2008 Ramesh Srinivasan" & Chr(10) & Chr(10) & "Visit us at http://www.05112.com/" strBaseBrch= "HKLM\Software\Classes\" If WScript.Arguments.Count <> 0 Then WshShell.run "%comspec% /c " & "echo " & chr(34) & _ WScript.Arguments.Item(0) & chr(34) & "| clip.exe",0 Else rtn= Trim(UCase(InputBox ("Type INSTALL to add the COPY AS PATH context menu option, or type UNINSTALL if you wish to remove the context menu option from your system.", "Configuring CopyPath.vbs...", "INSTALL"))) If rtn = "INSTALL" Then RunInstall If rtn = "UNINSTALL" Then RunUninstall End if Sub RunInstall ’Add registry values On Error Resume Next strCMD = "wscript.exe %systemroot%\copypath.vbs " & Chr(34) & "%1" & Chr(34) WshShell.RegWrite strBaseBrch & "Allfilesystemobjects\shell\Copypath\", "复制为路径", "REG_SZ" WshShell.RegWrite strBaseBrch & "Allfilesystemobjects\shell\CopyPath\Extended", "", "REG_SZ" WshShell.RegWrite strBaseBrch & "Allfilesystemobjects\shell\CopyPath\command\", strCMD, "REG_EXPAND_SZ" On Error Goto 0 MsgBox strMsg, vbokonly,"Installed" End Sub Sub RunUninstall ’Remove the registry values added by this script. On Error Resume Next WshShell.RegDelete strBaseBrch & "Allfilesystemobjects\shell\CopyPath\command\" WshShell.RegDelete strBaseBrch & "Allfilesystemobjects\shell\CopyPath\" On Error Goto 0 MsgBox strMsg, vbokonly,"Uninstalled" End Sub |
OK. 现在试试 按住shift后鼠标右键一个文件的时候,菜单里面是不是多出了个“复制为路径”了?
| 电脑网络超级技巧!让一切皆有可 | 01-31 |
| 电脑网络超级技巧!让一切皆有可 | 01-31 |
| XP急速启动最新技巧 | 09-04 |
| 让老机器也跑Vista系统 | 09-01 |
| Vista看高清电影声音太小 看我轻 | 09-01 |
| 简单几招让您的Windows系统不再假 | 08-27 |
| 收录大家解决系统内存不能为 Rea | 08-06 |
| 解决删除文件或文件夹出错故障 | 07-19 |
| 解决优化后XP不能自动更新的问题 | 07-16 |
| 虚拟内存介绍和及其详细和优化设 | 07-09 |
| PQ分区出错,用Ghost来补救的绝妙 | 07-02 |
| 复制Windows信息框文字到剪切板 | 06-18 |