原文链接:
Window10下可以快速复制文本所在的路径_ 知行合一 大道至简-CSDN博客
https://blog.csdn.net/cdl666666/article/details/106433439
一、复制结果带引号
复制下面内容到一个新建的.reg文件,然后双击运行即可
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTAllfilesystemobjectsshellwindows.copyaspath] "CanonicalName"="{707C7BC6-685A-4A4D-A275-3966A5A3EFAA}" "CommandStateHandler"="{3B1599F9-E00A-4BBF-AD3E-B3F99FA87779}" "CommandStateSync"="" "Description"="@shell32.dll,-30336" "Icon"="imageres.dll,-5302" "InvokeCommandOnSelection"=dword:00000001 "MUIVerb"="@shell32.dll,-30329" "VerbHandler"="{f3d06e7c-1e45-4a26-847e-f9fcdee59be0}" "VerbName"="copyaspath"
二、复制结果不带引号
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellcopypath] @="copy path of dir" [HKEY_CLASSES_ROOTDirectoryshellcopypathcommand] @="mshta vbscript:clipboarddata.setdata("text","%1")(close)" [HKEY_CLASSES_ROOT*shellcopypath] @="copy path of file" [HKEY_CLASSES_ROOT*shellcopypathcommand] @="mshta vbscript:clipboarddata.setdata("text","%1")(close)"
下载地址,下载后该后缀为.reg即可