Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #188823
| From | MikeS <mikes@is.invalid> |
|---|---|
| Newsgroups | alt.comp.os.windows-10, alt.comp.os.windows-11, alt.comp.microsoft.windows |
| Subject | Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files |
| Date | 2025-10-27 13:30 +0000 |
| Message-ID | <10dns58$1minp$1@solani.org> (permalink) |
| References | <10dn31k$2ltj$1@nnrp.usenet.blueworldhosting.com> |
Cross-posted to 3 groups.
On 27/10/2025 06:21, Marion wrote: > Efficiency: > If something takes x number of steps to do, we reduce it to one step. > > Tutorial: > Add "Copy path to clipboard" into the rightclick file explorer context menu > when saving files (e.g., when saving files in Irfanview's browser). > > I never use search on Windows because I have well-organized file > hierarchies, but deep hierarchies can cause a multi-click inefficiency > when, for example, I'm in Irfanview & I save an image somewhere. > Irfanview:File > Save as... (then I have to browse somewhere) > > What I want, in that "Save as..." GUI, is the ability to do 3 things: > 1. Open up a separate file explorer window there (to edit the file) > 2. Or, open a command window there (to work on the file) > 3. Or, copy the path to the clipboard (to use in other programs) > > To help with that, I previously wrote a tutorial to add these two lines > to the Windows rightclick context menu when saving files... > Rightclick > Open File Explorer Here > Rightclick > Open Command Windows Here > Where this tutorial adds a 3rd command to save the path to the clipboard: > Rightclick > Copy Path to Clipboard > > Here are the manual steps (registry file is below): > 1. In the registry, create a new subkey called "CopyPath" in the shell key: > HKEY_CLASSES_ROOT\Directory\Background\shell > > 2. Set its display name to "Copy Path to Clipboard" (or whatever you like): > Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\CopyPath > > 3. In the CopyPath key, double-click the (Default) value and set it to: > Copy Path to Clipboard > > 4. Right-click on CopyPath, choose New > Key, and name it "command": > Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\CopyPath\command > > 5. In the command key, double-click the (Default) value and set it to: > cmd.exe /c echo "%V" | clip > > Now, when we right-click in the white space of a folder or in a modern file > dialog (like IrfanView's save window), we will see "Copy Path to Clipboard" > alongside our other custom entries. Clicking it will instantly copy the > current folder path to our clipboard. The goal is saving steps. > > Since there's a "Win+R" runbox pinned to my taskbar, I can subsequently > open up that folder any time later by pasting the clipboard into it. > > In case there are spaces in the path, the clipboard entry is surrounded by > doublequotes, so it should work instantly when you click this *.reg file. > > Windows Registry Editor Version 5.00 > > ; --- Open File Explorer Here --- > [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenExplorerHere] > @="Open File Explorer Here" > "Icon"="imageres.dll,-5302" > > If needed, here's a reg file that adds all three efficiency tweaks: > a. Open Command Window Here > b. Open File Explorer Here > c. Copy Path to Clipboard > > Windows Registry Editor Version 5.00 > > ; --- Open File Explorer Here --- > [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenExplorerHere] > @="Open File Explorer Here" > "Icon"="imageres.dll,-5302" > [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenExplorerHere\command] > @="explorer.exe %V" > > ; --- Open Command Window Here --- > [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere] > @="Open CLI Window Here" > "Icon"="imageres.dll,-5324" > [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command] > @="cmd.exe /k cd /d %V" > > ; --- Copy Path to Clipboard --- > [HKEY_CLASSES_ROOT\Directory\Background\shell\CopyPath] > @="Copy Path to Clipboard" > "Icon"="imageres.dll,-5302" > [HKEY_CLASSES_ROOT\Directory\Background\shell\CopyPath\command] > @="cmd.exe /c echo \"%V\" | clip" > > Note the Windows quirk that the order we wrote them in the .reg file does > not strictly guarantee the order in the right-click menu. Windows Explorer > usually sorts shell context menu entries alphabetically by key name. > > So in practice, we will likely see them in this order: > c. Copy Path to Clipboard > a. Open Command Window Here > b. Open File Explorer Here > > If we want to force a specific order, we can prefix the key names with > numbers or letters, if that's an issue, such as these examples below. > [HKEY_CLASSES_ROOT\Directory\Background\shell\01OpenExplorerHere] > [HKEY_CLASSES_ROOT\Directory\Background\shell\02OpenCmdHere] > [HKEY_CLASSES_ROOT\Directory\Background\shell\03CopyPath] > > I also added an "Open Admin Window Here" but that's more involved. "Copy as path" already exists in my right click file explorer context menu. Where do you think it goes if not the clipboard? Congratulations on reaching new heights in your efforts to make simple tasks difficult.
Back to alt.comp.os.windows-10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 00:21 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files "R.Wieser" <address@is.invalid> - 2025-10-27 11:13 +0100
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 13:14 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files "R.Wieser" <address@is.invalid> - 2025-10-27 23:07 +0100
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 19:34 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files MikeS <mikes@is.invalid> - 2025-10-27 13:30 +0000
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 12:58 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Andy Burns <usenet@andyburns.uk> - 2025-10-27 19:06 +0000
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 13:51 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Herbert Kleebauer <klee@unibwm.de> - 2025-10-27 22:11 +0100
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 18:56 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Andy Burns <usenet@andyburns.uk> - 2025-10-27 22:05 +0000
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-27 19:12 -0600
Re: Tutorial: Add "Copy path to clipboard" into the rightclick file explorer context menu when saving files Marion <mariond@facts.com> - 2025-10-29 11:48 -0600
csiph-web