xp下也能像vista那样快速复制某个文件的完整路径到剪贴板
不过我相信微软不会这么无耻下贱的,于是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
下载地址http://xiazai.jb51.net/201101/tools/clip.rar
第二,将下面的内容保存为copypath.vbs
下载地址
http://www.winhelponline.com/blog/wp-content/uploads/copypath.vbs
- '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- 'COPYRIGHT NOTICE: This script and all material at Winhelponline.com are registered
- 'with "The UK Copyright Service". No part of the Website can be distributed or ...
- 'republished without the author's written permission.
- 'Copyright ?2008 by Ramesh Srinivasan. All rights reserved.
- '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- 'CopyPath.vbs - File description
- '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- 'Copy the Path of a file or folder to the Clipboard
- 'Created on May 10, 2008
- 'Copyright ?2008 Ramesh Srinivasan.
- 'Author: Ramesh Srinivasan, Microsoft MVP (Windows Desktop Experience)
- 'Website: http://www.winhelponline.com
- '"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- 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.winhelponline.com/blog"
- 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\", "Copy as Path", "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
- '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- 'This script was brought to you by "The Winhelponline Blog"
- 'Visit us at http://www.winhelponline.com/blog
- '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
第三, 上面两个文件,即copypath.vbs和CLIP.EXE都放到c:\windows目录下面,然后双击copypath.vbs,确定 之。
OK. 现在试试 按住shift后鼠标右键一个文件的时候,菜单里面是不是多出了个“复制为路径”了