{"id":275,"date":"2008-05-10T17:13:02","date_gmt":"2008-05-10T11:43:02","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=275"},"modified":"2021-05-31T16:21:02","modified_gmt":"2021-05-31T10:51:02","slug":"add-copy-as-path-right-click-menu-in-xp","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/add-copy-as-path-right-click-menu-in-xp\/","title":{"rendered":"How to Add &#8220;Copy as Path&#8221; to Right Click Menu in Windows XP"},"content":{"rendered":"<p>Windows Vista and higher already include the useful <b><a title=\"Using &quot;Copy as Path&quot; command to copy file or folder path to Clipboard\" href=\"https:\/\/www.winhelponline.com\/blog\/copy-as-path-always-show-right-click-windows-10\/\">Copy as Path<\/a><\/b> option in the context menu, which helps you quickly copy the complete path of the selected file(s) or folder(s) to the Clipboard. Here is how to add &#8220;Copy of Path&#8221; feature in Windows XP.<!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath.jpg\" width=\"165\" height=\"115\" border=\"0\" \/><\/p>\n<p>There are two methods discussed, both of them require the <b>Clip.exe<\/b> file from Microsoft. Clip.exe redirects command-line output to the Windows Clipboard. For example, typing the command <b>dir | clip<\/b> in a Command Prompt window places a copy of the current directory listing into the Windows clipboard.<\/p>\n<p><b>Note:<\/b> When using the <b>Copy as Path<\/b> command after following the steps in <b>Method 1<\/b>, you&#8217;ll see a Command Prompt window opening and closing briefly. <b>Method 2<\/b> uses a VBScript which launches the Command Prompt window in invisible mode.<\/p>\n<p>Download <b>Clip.exe<\/b> from the Microsoft FTP site <a href=\"ftp:\/\/ftp.microsoft.com\/Services\/TechNet\/samples\/PS\/Win98\/Reskit\/FILE\/CLIP.EXE\">here<\/a> and save the file to your Windows directory.<\/p>\n<p>(To open the Windows directory in your system, click Start \u2192 Run, type <code>%systemroot%<\/code>, and press Enter.)<\/p>\n<p>Then, follow one of the methods below.<\/p>\n<h2>Add &#8220;Copy as Path&#8221; to Right Click Menu<\/h2>\n<ol>\n<li>Download <b><a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath.reg\">copypath.reg<\/a><\/b> and save it to the Desktop.<\/li>\n<li>Right-click on the file and choose <b>Merge<\/b>.<\/li>\n<li>Click <b>Yes<\/b> when asked for confirmation.<\/li>\n<\/ol>\n<p>This adds the following registry key:<\/p>\n<pre>HKEY_CLASSES_ROOT\\Allfilesystemobjects\\shell\\CopyPath\\command<\/pre>\n<p>and sets the <code>(default)<\/code> value to:<\/p>\n<pre>%comspec% \/c &lt;nul (set\/p anyvariable=\"%1\")|clip.exe<\/pre>\n<p>You&#8217;ll see the &#8220;Copy as Path&#8221; option when you right-click a file or folder.<\/p>\n<p><i>Note: Previously it was %comspec% \/c echo &#8220;%1&#8243;|clip.exe, but since that adds a line feed, I had to change the command-line as above. Thanks to Eric.<\/i><\/p>\n<div class=\"rp\"><strong>Related:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/copy-as-path-without-quotes-file-uri-format\/\">How to Copy as Path Without Quotes and in File URI Format<\/a><\/div>\n<h3>Using a Script<\/h3>\n<p>To automate the above task of adding or removing the <strong>Copy as Path<\/strong> menu option, you can use this script as an alternative.<\/p>\n<ol>\n<li>Download <b><a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath.zip\">copypath.zip<\/a><\/b> extract the script file copypath.vbs file to your Windows directory.<\/li>\n<li>Double-click <b>copypath.vbs<\/b> to run it.<\/li>\n<li>Click Ok when you see the following prompt:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath2.gif\" width=\"363\" height=\"162\" border=\"0\" \/><\/li>\n<\/ol>\n<p><em><span style=\"text-decoration: underline;\">(<\/span>To remove the <b>Copy as Path<\/b> context menu option, double-click the <code>copypath.vbs<\/code> file, type <code>UNINSTALL<\/code> and click Ok. Then delete the file <code>copypath.vbs<\/code> manually from your Windows directory.<span style=\"text-decoration: underline;\">)<\/span><\/em><\/p>\n<p>After following one of the methods above, &#8220;Copy as Path&#8221; 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 &#8220;Copy as Path&#8221;.<\/p>\n<p><b>Additional Tip:<\/b> If you want to make the Copy as Path command always available (without needing to use the SHIFT key), simply delete the value named <strong>Extended<\/strong> in the registry location below, using the Registry Editor:<\/p>\n<pre>HKEY_CLASSES_ROOT\\Allfilesystemobjects\\shell\\CopyPath<\/pre>\n<p>See also: <a href=\"https:\/\/www.winhelponline.com\/blog\/add-the-open-file-location-context-menu-for-shortcuts-in-windows-xp\/\">How to Add &#8220;Open File Location&#8221; Right-Click Option in Windows XP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Vista and higher already include the useful Copy as Path option in the context menu, which helps you quickly copy the complete path of the selected file(s) or folder(s) to the Clipboard. Here is how to add &#8220;Copy of Path&#8221; feature in Windows XP.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12],"tags":[114,441,480],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-windows-xp","tag-context-menu","tag-registry","tag-scripts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}