If you're able to use something like AutoHotkey, try this out in a script.
The code should be fairly self explanatory, but to be clear I'll explain:
It will only be registered when a Windows Explorer window is open. After storing your current clipboard, it sends Shift+AppsKey, which opens the expanded context menu. Then it sends the letter "a", which is the shortcut key in that menu for "Copy as path". Afterward, it restores your previous clipboard and "returns" the value. This value is able to be used separately in any manner you want. Basically, you can store it in a variable, and then use it in another function. For example, using it as a parameter for a Google search. You would need to write the remaining logic for its use in this manner, because simply returning a value and not doing anything with it is meaningless.
At the bottom, the hotkey Shift+Alt+f (Adjustable; read the docs for more info) triggers that function, and displays the result in a message box.
#If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass")
;; Returns the unquoted full-path for the selected file/folder in Windows Explorer
GetUnquotedFullPathFromSelectionInExplorer() {
local
clipSaved := ClipboardAll
Clipboard := ""
SendInput, +{AppsKey}a
ClipWait, 3 ; Wait up to three seconds
if (ErrorLevel && !Clipboard) {
Clipboard := clipSaved
MsgBox, Failed to copy path to clipboard
Return
}
fullPath := Clipboard
Clipboard := clipSaved
Return Trim(fullPath, """") ; trims any surrounding double quotes
}
;; Makes a popup message box with the unquoted full-path for the selected file/folder
;; in Windows Explorer
+!f:: ; Shift+Alt+f
MsgBox, % GetUnquotedFullPathFromSelectionInExplorer()
Return
#If
If you'd rather keep the path in your clipboard, it would be even shorter. For example:
#If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass")
;; Updates the clipboard with the unquoted full-path for the selected
;; file/folder in Windows Explorer
+!f:: ; Shift+Alt+f
Clipboard := ""
SendInput, +{AppsKey}a
ClipWait, 3 ; Wait up to three seconds
if (ErrorLevel && !Clipboard) {
MsgBox, Failed to copy path to clipboard
Return
}
Clipboard := Trim(Clipboard, """")
Return
#If