• Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to paste shortcut to file by keystroke or command?

Status
Not open for further replies.

MIRKOSOFT

PCHF Member
Aug 30, 2016
204
21
44
Hi!

I have new mouse with more buttons.
In mode 1 I added to two buttons functions Copy and Paste.
I want to use else one button to Paste shortcut to file.
This function is in Explorer and I don't know keystroke, if any has...

Is it possible to do by command or any keystroke?

Thank you for all.
Miro
 
No, this is normal, everybody knows these keystrokes Ctrl XCV...
In File Explorer is button to Paste Shortcut (maybe incorrect translation from Slovak language9.
Working this:
Clipboard: C:\Program\test.exe
normal paste copies test.exe to new location
paste shortcut created link to test.exe in new location like: test.lnk
Is it now understandable?

Miro
 
You can press
Code:
Ctrl + Shift
to create a shortcut while dragging. That will create an .Ink file. Is this what you want? If not you can do
Code:
Shift + F10
and that'll pull up the right-click menu and you can manually click "Create Shortcut"
 
No, for correction:
Each file in clipboard has also path where is stored.
I need to create command or any keystroke (without drag&drop) to paste for this threa - link to file.
Why command ?
I'm using for remapping keyboard and mouse AHK scripting, I need to create anything like this:
<script>
; pressing Alt+F1 performs paste (Ctrl+V)
!F1::
Send, ^{v 1}
return
</script>
Of course drag&drop with holding left Alt creates lnk.
I need it without drag&drop.
Miro
 
Simply why not...
I want to paste shortcut to other location than location of file...
In Windows 10 file Explorer is button for this here:
pasteshortcut.png

And it looks it has no keystroke.
If you can help how to performthat action I'll be happy.
Miro
 
Hi,
For something like that, that will require scripting. That way, it does what YOU want. There is no keyboard command to paste a shortcut without triggering a D&D (Drag & Drop) or requiring another click. That requires scripting.
 
  • Like
Reactions: Malnutrition
Here's script which created GEV in AHK community:
Code:
clipboard := clipboard  ; convert clipboard to plain text (= copy the path of the copied file)
Sleep, 300
SplitPath, clipboard,,,, name_no_ext
IfWinActive, ahk_class Progman   ; desktop
    FileCreateShortcut, %clipboard%, %A_Desktop%\%name_no_ext%.lnk
else
IfWinActive, ahk_class CabinetWClass   ; explorer
{
    ; get current explorer path:
    for window in ComObjCreate("Shell.Application").Windows
    try Fullpath := % window.Document.Folder.Self.Path
        FileCreateShortcut, %clipboard%, %Fullpath%\%name_no_ext%.lnk
}

I mean can help anybody in this forum too. It's simple Paste shortcut script.
Thank you all for everything.
Miro
 
  • Like
Reactions: veeg and jmarket
Here's script which created GEV in AHK community:
<code>
clipboard := clipboard ; convert clipboard to plain text (= copy the path of the copied file)
Sleep, 300
SplitPath, clipboard,,,, name_no_ext
IfWinActive, ahk_class Progman ; desktop
FileCreateShortcut, %clipboard%, %A_Desktop%\%name_no_ext%.lnk
else
IfWinActive, ahk_class CabinetWClass ; explorer
{
; get current explorer path:
for window in ComObjCreate("Shell.Application").Windows
try Fullpath := % window.Document.Folder.Self.Path
FileCreateShortcut, %clipboard%, %Fullpath%\%name_no_ext%.lnk
}
</code>

I mean can help anybody in this forum too. It's simple Paste shortcut script.
Thank you all for everything.
Miro
Nice tip thanks..:)
 
Status
Not open for further replies.