{"id":3903,"date":"2016-08-26T10:44:59","date_gmt":"2016-08-26T05:14:59","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=3903"},"modified":"2021-05-25T14:40:27","modified_gmt":"2021-05-25T09:10:27","slug":"copy-as-path-without-quotes-file-uri-format","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/copy-as-path-without-quotes-file-uri-format\/","title":{"rendered":"How to Copy as Path Without Quotes or in File URI Format"},"content":{"rendered":"<p>When using the built-in <a href=\"https:\/\/www.winhelponline.com\/blog\/copy-as-path-always-show-right-click-windows-10\/\">Copy as Path<\/a> context menu option or the <strong>Copy Path<\/strong> ribbon button to copy file names to clipboard, the output would contain quotes for file\/folder name paths, such as below.<!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3904\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copyaspath-uri-1.png\" alt=\"copy as path without quotes and in URI format\" width=\"650\" height=\"347\" \/><\/p>\n<p>There are some situations where you don&#8217;t need quotes whether the file names contain spaces or not. To accomplish that, you can add your own <b>Copy as Path<\/b> option using a custom script and access it from the Send To menu.<\/p>\n<h2>Copy Path without Quotes<\/h2>\n<p>I made a script that does that, making use of the excellent NirCmd, multi-purpose command-line automation tool. Optionally, the script can also be modified to copy file paths in URI format if required.<\/p>\n<ol>\n<li>Download <strong>NirCmd<\/strong> from Nirsoft.net and extract <code>NirCmd.exe<\/code> to your Windows folder.<\/li>\n<li>Download the <code>copy_as_path.vbs<\/code> VBScript shown below.<br \/>\n<script src=\"https:\/\/gist.github.com\/winhelponline\/e96650a009207b113109d4f83e67450e.js?file=copy_as_path.vbs\"><\/script><\/li>\n<li>Move the script to a permanent location such as <code>C:\\Windows<\/code> or anywhere you prefer.<\/li>\n<li>Double-click the script so that it adds a shortcut to the Send To folder automatically. You need to do this only for the first time.<\/li>\n<li>Now, select the files\/folders, click Send To and click <b><b>Copy as Path<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3905\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copyaspath-uri-2.png\" alt=\"copy as path without quotes and in URI format\" width=\"650\" height=\"562\" \/><br \/>\n<\/b><\/b>This copies the file\/folder paths to Clipboard without quotes.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3906\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copyaspath-uri-3.png\" alt=\"copy as path without quotes and in URI format\" width=\"650\" height=\"239\" \/><\/li>\n<\/ol>\n<h3>How to Copy Paths in URI format?<\/h3>\n<p>You can choose to copy file paths in URI format like the one below.<\/p>\n<pre>file:\/\/\/C:\/Program%20Files\/Common%20Files<\/pre>\n<p>To do so, edit the script file (.vbs) using Notepad and change the following line:<\/p>\n<pre>CopyAsURI = 0<\/pre>\n<p>as below:<\/p>\n<pre>CopyAsURI = 1<\/pre>\n<p>And save the script file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3907\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copyaspath-uri-4.png\" alt=\"copy as path without quotes and in URI format\" width=\"650\" height=\"288\" \/><\/p>\n<p>Select the files\/folders, click Send To and click Copy as Path. File\/folder paths would now be copied in URI format.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3908\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copyaspath-uri-5.png\" alt=\"copyaspath-uri-5\" width=\"650\" height=\"239\" \/><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/add-mail-recipient-as-path-option-send-to-menu-to-email-file-paths\/\">How to Email File Path to Mail Recipient Using the Send To menu<\/a><\/div>\n<p>I hope you find these scripts useful and productive. Let&#8217;s know your comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When using the built-in Copy as Path context menu option or the Copy Path ribbon button to copy file names to clipboard, the output would contain quotes for file\/folder name paths, such as below.<\/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":[7],"tags":[480],"class_list":["post-3903","post","type-post","status-publish","format-standard","hentry","category-windows","tag-scripts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":275,"url":"https:\/\/www.winhelponline.com\/blog\/add-copy-as-path-right-click-menu-in-xp\/","url_meta":{"origin":3903,"position":0},"title":"How to Add &#8220;Copy as Path&#8221; to Right Click Menu in Windows XP","author":"Ramesh","date":"May 10, 2008","format":false,"excerpt":"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 \"Copy of Path\" feature in Windows XP. There are two methods discussed,\u2026","rel":"","context":"In &quot;Windows XP&quot;","block_context":{"text":"Windows XP","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-xp\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":425,"url":"https:\/\/www.winhelponline.com\/blog\/run-bat-files-invisibly-without-displaying-command-prompt\/","url_meta":{"origin":3903,"position":1},"title":"How to run .BAT files invisibly, without displaying the Command Prompt window","author":"Ramesh","date":"August 5, 2008","format":false,"excerpt":"Batch files (.BAT) and Windows NT Command Script (.CMD) files run in console window when double-clicked. This means that the Command Prompt window will be visible until the .BAT or .CMD file execution is complete. To make .BAT or .CMD file execution less intrusive, you can configure it to run\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"run batch file hidden - nircmd exec","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/08\/nircmd-batch-file-hidden.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4931,"url":"https:\/\/www.winhelponline.com\/blog\/restart-explorer-gracefully-shortcut-command\/","url_meta":{"origin":3903,"position":2},"title":"How to Restart Explorer Cleanly Using Shortcut or Command-line","author":"Ramesh","date":"December 31, 2016","format":false,"excerpt":"When you make changes to the Windows registry using the Registry Editor, script or any other automation tool, you may have to logoff and login back for the changes to take effect. That's especially true if you're altering the UI element metrics or changing the shell namespace folder icons etc.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"restart explorer gracefully","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":446,"url":"https:\/\/www.winhelponline.com\/blog\/add-mail-recipient-as-path-option-send-to-menu-to-email-file-paths\/","url_meta":{"origin":3903,"position":3},"title":"How to Email File Paths via the Send To menu","author":"Ramesh","date":"August 13, 2008","format":false,"excerpt":"Let's assume you're working in the training department of a firm and need to send training materials to recruits regularly. The usual way is to right-click on the file, click Send To, and click Mail Recipient. This attaches the file to the compose window in your mail client. How about\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"email file path context menu","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/08\/outlook-message-email-file-path.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/08\/outlook-message-email-file-path.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/08\/outlook-message-email-file-path.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/08\/outlook-message-email-file-path.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":231,"url":"https:\/\/www.winhelponline.com\/blog\/copy-target-url-context-menu-option-for-internet-shortcut-url-files\/","url_meta":{"origin":3903,"position":4},"title":"How to Copy Address of a Internet Shortcut (.URL) via Right-click Menu","author":"Ramesh","date":"April 26, 2008","format":false,"excerpt":"The Copy as Path command in the right-click menu is an extremely useful one to quickly copy the full path of a file or folder to clipboard. Similarly, for internet shortcut (.url) files, here is a script that lets you copy the web address (URL) of a internet shortcut, via\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"add \"copy target url\" context menu option for internet shortcuts","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/copytargeturl.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":890,"url":"https:\/\/www.winhelponline.com\/blog\/add-nircmd-speak-to-context-menu-text-files\/","url_meta":{"origin":3903,"position":5},"title":"Fun Tip: Add &#8220;Speak&#8221; Option to the Context Menu for Text Files","author":"Ramesh","date":"April 8, 2009","format":false,"excerpt":"The amazing NirCmd utility now has a new \"speak\" command that allows you to easily cause your computer to speak the text that you wish. In this command, NirCmd uses the Speech library (SAPI) that is installed in Windows. Here is a fun tip on how to add the Speak\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/nircmd-speak.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3903","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=3903"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/3903\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=3903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=3903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=3903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}