<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Image Drag > Image Name or Image Code Switch]]></title><description><![CDATA[<p dir="auto">FOR NOTEPAD DESIGNERS: I do a lot of web page creation and insert a plethora of image names into the [html/css/script] code.  To get the image name into the code I perform a lot of cut and paste.  I could save at least an hour a day if I could drag the image icon into my NotePad session and have the image [file] name automatically fill the text space where I drop the image.  As it is now, the image file code fills the text space.  It would be fantastic to have a switch setting [under settings] that allows a user to select Code or File Name as the content of a drag and drop insert.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13278/image-drag-image-name-or-image-code-switch</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 19:37:49 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13278.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 Feb 2017 14:50:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Tue, 14 Feb 2017 14:59:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>: To the point of the second camp: I’m not sure whether dragging-and-dropping a file from a Windows Explorer into NPP is a Windows Explorer operation, or a NPP operation, or a strange mix, so I have my doubts whether there is anything you could do in the NPP code to optionally “intercept” that operation – but I’ve never coded a drag-and-drop interface, so I could be wrong.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mapje71" aria-label="Profile: MAPJe71">@<bdi>MAPJe71</bdi></a> &amp; <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a>: Yeah, there was a reason I didn’t explain that “command-trickery”: I had grabbed that command from some website a few years back, and had since forgotten exactly why they did the <code>set</code> trickery.</p>
<p dir="auto">It seems to work even with the simplified <code>cmd.exe /c (echo "%1" | clip.exe)</code>.</p>
<p dir="auto">Ah, I did some searching, and found the page I think I originally found it from: <a href="http://www.askvg.com/registry-tweak-to-add-copy-as-path-option-in-files-and-folders-context-menu-in-windows/" rel="nofollow ugc">http://www.askvg.com/registry-tweak-to-add-copy-as-path-option-in-files-and-folders-context-menu-in-windows/</a> : It turns out that the simplified <code>cmd.exe /c (echo "%1" | clip.exe)</code> will include the newline in the clipboard, whereas the set/p trickery will prevent the newline from being in the clipboard.</p>
<p dir="auto">And I was also reminded in the article: with a default Vista/Win7/Win8 installation, there is already a “Copy as Path” in the extended <code>SHIFT+RightClick</code> menu – and without the newline – so you don’t even need my registry hack, it should just “be there”.  (If you don’t notice it, it’s probably down near “Pin to Start Menu” and above the “Send To…”)</p>
<p dir="auto">Ah, there we go: <a href="http://superuser.com/questions/295484/unhide-windows-7-context-menu-extras-permanently" rel="nofollow ugc">http://superuser.com/questions/295484/unhide-windows-7-context-menu-extras-permanently</a> reminded me why I made my own version of the Copy As Path: some of the <code>SHIFT+RightClick</code> menu items can be “unhidden” so it goes into the normal RightClick menu (the extra “shift” annoyed me), but the “Copy as Path” stays hidden.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21883</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21883</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 14 Feb 2017 14:59:00 GMT</pubDate></item><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Tue, 14 Feb 2017 13:33:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mapje71" aria-label="Profile: MAPJe71">@<bdi>MAPJe71</bdi></a></p>
<p dir="auto">If I try what you suggest, which I believe is: <code>cmd.exe /c (echo.""%1"") | clip.exe</code> , then running it yields a <em>double</em> set of surrounding <code>"</code></p>
<p dir="auto">The obvious solution to <em>that</em> problem is to change it to: <code>cmd.exe /c (echo."%1") | clip.exe</code> , which seems to work equivalently to <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> 's original suggestion.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21877</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21877</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Tue, 14 Feb 2017 13:33:16 GMT</pubDate></item><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Tue, 14 Feb 2017 01:12:21 GMT]]></title><description><![CDATA[<p dir="auto">Why the additional <code>set</code> command instead of just echoing the argument value i.e. <code>(echo.""%1"")</code>?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21849</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21849</guid><dc:creator><![CDATA[MAPJe71]]></dc:creator><pubDate>Tue, 14 Feb 2017 01:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Tue, 14 Feb 2017 00:26:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">I think there are 2 camps on this one:  The DOS/CMD.exe veterans that appreciate the elegance and utility of this…and those that can’t quit complaining that N++ can’t do this natively (and needs a new user interface to be a useful program).  Upvoters are definitely in the first group!  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21848</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21848</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 14 Feb 2017 00:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Mon, 13 Feb 2017 15:27:47 GMT]]></title><description><![CDATA[<p dir="auto">So, I have added a right-click action to Windows Explorer which copies the full path of the selected file.</p>
<p dir="auto"><strong>WARNING</strong>: This involves editing the registry.  Use at your own risk.</p>
<ul>
<li><code>regedit</code></li>
<li><code>HKEY_CLASSES_ROOT\</code></li>
<li><code>   AllFilesystemObjects\</code>
<ul>
<li>if the <code>shell\</code> subkey doesn’t exist, add <strong>New &gt; Key</strong> = <code>shell</code> to the <code>AllFilesystemObjects</code> key</li>
</ul>
</li>
<li><code>      shell\</code>:
<ul>
<li>Right Click on <code>shell\</code>, add <strong>New &gt; Key</strong> = <code>CopyFullPath</code></li>
</ul>
</li>
<li><code>         CopyFullPath\</code>
<ul>
<li>Right Panel: <code>(Default)</code> : REG_SZ : <code>Copy Full Path to Clipboard</code></li>
<li>Right Panel: Right Click in blank, <strong>New &gt; String Value</strong> = <code>Icon</code></li>
<li>Right Panel: <code>Icon</code> : REG_SZ : <code>shell32.dll,-16763</code></li>
<li>Right Panel: Right click in blank, <strong>New &gt; Key</strong> = <code>command</code></li>
</ul>
</li>
<li><code>            command\</code>
<ul>
<li>Right Panel: <code>(Default)</code> : REG_SZ : <code>cmd.exe /c (echo.|set /p=""%1"") | clip.exe</code></li>
</ul>
</li>
</ul>
<p dir="auto"><strong>Explanation</strong> of the command shown: <code>cmd.exe /c</code> runs everything that follows in a new command processor.  The <code>(echo.|set /p=""%1"")</code> is some command-trickery to echo the filename, keeping the quotes around it; the <code>| clip.exe</code> pipes the output from the trickery to <code>clip.exe</code>, which is a Windows executable to add stuff to the Windows clipboard.</p>
<p dir="auto">At this point, if you open a new Explorer window, you should be able to right click on a file and choose “Copy Full Path to Clipboard”</p>
<p dir="auto"><img src="http://i.imgur.com/8VEcm84.png" alt="" class=" img-fluid img-markdown" /></p>
<p dir="auto">Sometimes, registry changes don’t propagate immediately.  If it didn’t for you, you can log out and back in to force the refresh.  (Or, if you have <a href="http://nirsoft.net/utils/nircmd.html" rel="nofollow ugc">NirSoft’s nircmd.exe</a>, you can run</p>
<pre><code>nircmd.exe sysrefresh
nircmd.exe shellrefresh
</code></pre>
<p dir="auto">… which will ensure Windows Explorer will be refreshed.)</p>
<p dir="auto">But at this point, you should be able to copy the full path to a file to the clipboard, and then paste it into your document in Notepad++.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21833</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21833</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 13 Feb 2017 15:27:47 GMT</pubDate></item><item><title><![CDATA[Reply to Image Drag > Image Name or Image Code Switch on Sat, 11 Feb 2017 15:51:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dennis-struck" aria-label="Profile: Dennis-Struck">@<bdi>Dennis-Struck</bdi></a></p>
<p dir="auto">Your description (after “as it is now…”) makes it sound like the image binary data is being copied into the middle of the current file you are editing with Notepad++.  I believe what is really happening when you drag and drop into Notepad++ is that a new editor tab is being created, representing the file dropped.  Your description versus what is happening is TWO DIFFERENT THINGS.</p>
<p dir="auto">That being said, I understand what you want.  If you are using standard Windows Explorer, then copying a filename (so that you can put it into a text buffer you are editing with Notepad++) is a really labor-intensive process (as you have said).</p>
<p dir="auto">So…there are better ways.  For example, it is super-quick and easy when you use XYPlorer as your file-manager:  Click your desired file with the left mouse button and hold it; tap the right mouse button and a menu pops up with various choices for copying the current file/path to the clipboard.  I use XYPlorer (obviously), but I presume other Explorer.exe replacements also provide the same simplicity for this type of action.  I think one of these is truly hat you need.</p>
<p dir="auto">I guess my key point is that copying filenames from the file system is really a job for an Explorer-like program, not (really) Notepad++.  It <em>could</em> be a Notepad++ feature, though; point taken.  You can certainly make a feature suggestion (well within your right to do so), however, features are slow to get adopted when they are even accepted, and as you say, your need to save “an hour a day” is immediate.  So…that’s about all I’ve got to say.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21774</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21774</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 11 Feb 2017 15:51:23 GMT</pubDate></item></channel></rss>