Registry Tweak to Add “Copy as Path” Option in Files and Folders Context Menu in Windows
Windows Vista, Windows 7 and Windows 8 comes with many new and advanced context menu options which were not available in Windows XP, "Copy as Path" option is one of them.
"Copy as Path" option appears whenever you press "Shift" key and right-click on a file or folder. This option automatically copies the full path of the selected file or folder to clipboard. It might come very useful in many situations.
We have shared a few freeware to get this option in Windows XP which can be downloaded using following link:
In the above mentioned topic, one AskVG reader "Stamimail" asked for a Registry tweak to add the same option without using any 3rd party software. I tried the code given by another reader "Allal" in the same topic but it didn't work. After a little tweaking, I got success in adding the "Copy as Path" option in files and folders context menu with the help of Registry Editor.
So if you also want to enjoy "Copy as Path" option, check out following simple steps:
1. Type regedit in RUN dialog box and press Enter. It'll open Registry Editor.
2. Now go to following key:
3. Under shell key, create a new key and set its name to Copy as Path.
4. Now create another new key under the new Copy as Path key and set its name to command.
So the final path would be:
HKEY_CLASSES_ROOT\*\shell\Copy as Path\command
5. Now click on command key and in right-side pane, set the value of (Default) to:
cmd.exe /c echo "%1"|clip
That's it. It'll immediately add the "Copy as Path" option in files context menu. Just right-click on a file and select "Copy as Path" option and it'll copy the full path to clipboard. You can paste it in a text editor, browser or anywhere else.
NOTE 1: The above mentioned code copies the path within double-quotes (""). If you don't want the double-quotes, use following code instead:
cmd.exe /c echo %1|clip
NOTE 2: The above mentioned code puts Carriage Return or Line Feed (CR/LF) after the copied path. If you just want to copy path without line feed, use following code instead: (Thanks to Geoff for sharing this code...)
cmd.exe /c (echo.|set /p=""%1"") | clip
6. If you also want to add "Copy as Path" option in folders context menu, follow the same steps 3-5 for following key as well:
PS: If you don't want to modify Registry yourself and want a ready-made Registry script to do the task automatically, download following ZIP file, extract it and run the extracted REG file. It'll ask for confirmation, accept it:
Other similar articles that may interest you
- How to Change or Customize Day Name, Date and Time Format on Windows 8 and 8.1 Lock Screen?
- Download Windows 8 Concept Login Screen “Gloosh” for Windows 7
- Hidden Secret Codes for Samsung Wave “Bada OS” Mobile Phones
- [DPI Scaling Fix] Bold, Blurry or Hard to Read Font Problem in Windows 8.1 / 10
- Revealing Interesting Secret Behind Windows Build Numbers
- How to Fix “Windows NT Setup Files Detected” Error Message While Running UXTheme Patcher in Windows XP