This post tells you how to always show the Copy Path option in the right-click menu by default in Windows 10, without needing to press Shift every time.
The much useful “Copy as Path” built-in context menu exists in all versions of Windows. It’s an extended command which means you need to hold down the Shift key to access the extended menu item. Press and hold Shift, and right-click on a file or folder. Click “Copy as Path option” in the context menu. The object’s (file or folder) full path is now copied to the Clipboard.
Here is how the standard “Copy as Path” option appears.
Always Show “Copy as Path” in the Right-click Menu
If you frequently use Copy as Path, having to access it by pressing the Shift key every time can be annoying like hell. There is a registry tweak to show the menu by default without having to press the Shift key down.
- Copy the following lines to Notepad.
Windows Registry Editor Version 5.00 ;Show Copy as Path always in the right-click menu, without pressing SHIFT ;Ramesh Srinivasan, Winhelponline.com [HKEY_CLASSES_ROOT\Allfilesystemobjects\shell\windows.copyaspath] @="Copy &as path" "Icon"="imageres.dll,-5302" "InvokeCommandOnSelection"=dword:00000001 "VerbHandler"="{f3d06e7c-1e45-4a26-847e-f9fcdee59be0}" "VerbName"="copyaspath"
- Save the file as
copyaspath.reg
– see also How to use .REG files - Double-click the registry file to run it.
Here is how the new “Copy as path” command appears in the context menu of a file or folder.
(The above registry tweak is based on the article How to Add a Ribbon Command to Right-click Menu)
Optionally, you can customize the menu icon by editing the “Icon” path in the REG file or the registry directly.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
Hi, Ramesh. This is EXACTLY what I’ve been looking for. TY!
However imageres.dll doesn’t exist on my Win7 system, so the icon is “generic.” Thought you should know.
@Hafizullah: Thanks for the note. I’ll test it in a Windows 7 system and post back.
Update: The edit didn’t work in Windows 7. Works in Window 8 though.
You’re just made my life 0.5% better. Thanks
Thanks alot man, you rule. No need for a 3rd party app, awesome.
I use Windows 7 and it won’t work for me either. It showed up in the right click menu but I get an error message when I click on it. Do you have a fix for this? Thank you.
@Maggie: The fix works in Windows 8 and 10 only.
After trying this regedit, now when I right-click an item I get 2 “Copy as path” options. How can I remove the default right-click “Copy as path” option so only your option shows Or how do I remove yours from the right-click view so only the default shows?
@Edward: The default “Copy as Path” appears only when you do a Shift + Right-click.
I meant to say that now, when I do a Shift + Right click, Copy as path is listed twice. There is the standard, default Copy as path plus there is your Copy as path with your icon. I was wanting only one Copy as path to show when I Shift + Right click. I don’t care which one.
@Edward W: Here is the registry key for the default “copy as path” menu.. [HKEY_CLASSES_ROOT\AllFileSystemObjects\shellex\ContextMenuHandlers\CopyAsPathMenu]
Using the Registry Editor to delete the key (export it first) should get rid of the right-click entry.
2021-02-08
Thank you for this, Ramesh. With a Windows 10 update yesterday, the Shift-RightClick way to get Copy as path disappeared for image files, which was a major pain, though it continues to work for all other documents.
I’m delighted to discover that your work-around works for all files, and as a bonus it works without the Shift.
I can’t tell how long this discussion has been going on. When did you post this and when was the previous comment?
Thank you Ramesh!
Is there a way to have it not include quotes?
I know you wrote about using NirCmd and running a script, but I prefer not having to go to the Send To menu.
Thanks again!
I wrote my own special C++ program to deal with quotes. It is super smart in that it detects if path has spaces in it, and quotes it, otherwise it returns path without quotes. I just added simple copyaspath verb handler without all this COM GUIDs mumbo-jumbo and passed %V as argument to my program (which is actually the path of element selected). I also added this verb to the Directory\Background too!
Worked perfectly! I use “copy as path” at least a half-dozen times a week, and it was annoying to have to keep pressing the Shift key to get the Elevated context menu. Thanks!
Perfect. I was just imagining how useful this would be, so I googled it and found your site. Didn’t know it was a hidden feature. It should be easier to learn about! (Among dozen of other things for serious users who want an intuitive, smooth workflow. If you don’t got that, Windows is a pain in the butt. Thanks for this!
Thank you Ramesh! A mystery remains: why in latest Windows 10 Pro 21H2, your new “Copy as path” is limited to max 15 files-folders bulk selection, while built-in “Copy as path” with Shift works with more than 5000 files bulk? As an example, I tried in C:\Windows\System32\ folders.
Exactly same mysterious behaviour in Windows 11 Pro 21H2.
@VincentBounce:
It’s a limitation for static context menu at least since Windows XP/Vista. Whereas the original “Copy as Path” is implemented as a “context menu handler” instead of a static menu, so it doesn’t have that upper limit.
Why doesn’t the Print command appear when I select 20 files and right-click? – The Old New Thing:
https://devblogs.microsoft.com/oldnewthing/20150715-00/?p=45141
Context Menu Items Missing When More than 15 files Are Selected » Winhelponline:
https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/context-menus-shortened-select-over-15-files
https://www.winhelponline.com/blog/context-menu-missing-15-files-selected/