Windows Vista already includes the useful Copy as Path option in the context menu, which helps you quickly copy the complete path of the selected file or folder to the Clipboard. Earlier, we added the Add to Quick Launch and Open file location options to the context menu in Windows XP, as in Windows Vista. Here is how to add the Copy as Path functionality in Windows XP via the context menu.
There are two methods discussed, both of them require the Clip.exe file from Microsoft. Clip.exe redirects command-line output to the Windows Clipboard. For example, typing the command dir | clip in a Command Prompt window places a copy of the current directory listing into the Windows clipboard.
Note: When using the Copy as Path command after following the steps in Method 1, you’ll see a Command Prompt window opening and closing briefly. Method 2 uses a VBScript which launches the Command Prompt window in invisible mode.
Download Clip.exe from the Microsoft FTP site here and save the file to your Windows directory.
(To open the Windows directory in your system, click Start – Run, type %systemroot% and press ENTER.)
Then, follow one of the methods below.
METHOD 1
Download copypath.reg and save it to the Desktop. Right-click on the file and choose Merge. Click Yes when asked for confirmation.
METHOD 2
Download copypath.vbs and save it to your Windows directory.
Double-click copypath.vbs to run it.
Press ENTER when you see the following prompt:

To remove the Copy as Path context menu option, double-click the copypath.vbs file, type UNINSTALL and press ENTER. Then delete the file copypath.vbs manually from your Windows directory.
After following one of the methods above, Copy as Path option will be added to the context menu. To copy a file or folder path to Clipboard, press and hold the SHIFT key, right-click on the file or folder and click Copy as Path.
Additional Tip: If you want to make the Copy as Path command always available (without needing to use the SHIFT key), simply delete the value named Extended in the registry location below, using the Registry Editor:
SEE ALSO
- Adding the "Add to Quick Launch" context menu option in Windows XP
- "Copy Target URL" context menu option for Internet Shortcut (.url) files
- Add the "Open file location" context menu for shortcuts in Windows XP
- Adding the Run as Administrator option for .VBS and .JS files in Vista
If you think of any other script ideas, feel free to post them in the Comments section below ![]()
Related Posts
- “Copy Target URL” Context Menu Option for Internet Shortcut (.Url) Files
- Print Directory Listing to Clipboard From the Context Menu in Windows XP and Windows Vista
- Copy Text File Contents to the Clipboard Using the Context Menu
- Print Search Results in Windows Vista
- Firefox Add-Ons to Copy WebPage Title and URL to the Clipboard
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?





Rather than use the clip.exe, I use the ancient but perfectly functional SendtoX power toy from windows 95 days. It works perfectly with every copy of XP I’ve tried it on. There’s a mirror of them here: http://www.ise.ufl.edu/kisko/files/freeware/Powertoy%20-%20Win95%20tools%20from%20Microsoft/
Thanks for that… very handy. I tried mikes fix to lose the surrounding quotes… It works! Thx mike…… ‘cept the mildly annonying cmd window pops up again. But I can live with that :)
is there a way to enable right to left support or file names in a different encoding?
Awe_some!
I just discovered your site, Ramesh, and I wish I’d discovered it five years ago! I’m finding so many little tips I wish I’d had — Download Places (got rid of the default My Documents, that I never use) — this one, which saves a LOT of hand-typing as well as clicking … I’m sure I’ll find many more! Can’t wait to browse the rest of the site.
Thank you, thank you, thank you!
rather than using this hack & tweak, i can recommend this cool little app:
http://www.novell.com/coolsolutions/tools/13986.html
it “copies path”, full name, 8+3 name, UNC names for net-drives — i wouldnt miss it on any of my machines.
I had to remove the quotes from the copied text to work with the web app I’m pasting a path into. Goto HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\CopyPath\command and alter the default key to %comspec% /c echo %1|clip.exe , really just removing the quotes from around the percent1 pipe clip.exe