Paste shortcuts (PASTELINK) that include filename extensions

Hi forum! I've found posts that come close to this but don't quite match. The result I want is the behavior of 'Clipboard PASTELINK' for multiple files, but without removing the file extensions of the original files.

That is, I want to copy files or filenames with path (e.g. Ctrl-C or possibly 'Clipboard COPYNAMES {allfilepath}') while in one directory, then in another directory paste shortcuts to the original files -- but contrary to the default behavior of PASTELINK, these shortcuts should include the extensions of the original files.

The closest to this seems to be a 2015 post titled "Creating shortcuts that include target-file extensions," where Leo suggests using COPY MAKELINK. But that doesn't fit, with or without HERE, because I don't want to paste shortcuts 1) into the same folder; or 2) into a destination folder (since I don't use dual displays by default).

Is there a way, via command arguments or scripting, to achieve this behavior?

Many thanks,


1 Like

Thanks, Yeremee -- I know I could use a dialog box asking for the destination, but my requirement to "then in another directory paste shortcuts to the original files" means that I want to navigate to another directory, then paste the shortcuts (as you would paste the files using Ctrl-V).

Thanks again for the try.

Anyone else have an idea on this one?

Up front, I am not entirely sure what you mean, but maybe.. add the command to context Drag & Drop-menu ?
Copy MAKELINK AS *.lnk
select files and drag then rightclick drag them into another drive/folder?
Maybe it is not what you meant, then forget my suggestion. It was just an idea...


I would like this to work: Clipboard PASTELINK AS *.LNK... But AS param isn't working in conjunction with PASTELINK param (although it would be nice).

Thanks to both for having a go at this!

opw62: Drag & drop not an option - I'm a keyboarder through and through.

Yeremee: Your description of the requirement seems to fit pretty closely. Must work with multiple files, as I say.

Both: The idea is simpler than I've made it, I think. It's exactly like Clipboard PASTELINK except that the pasted links include their original three-letter extensions. That's not the behavior of PASTELINK, which creates shortcuts without the original extensions.

Thanks again for chiming in. Much appreciated!

I'm not sure there is a way to change the filenames that PASTELINK generates, but you should be able to do the same thing using a script.

DOpus.GetClip and .GetClipFormat can be used to get a list of files currently in the clipboard.

Shortcuts can be created using WshShell.CreateShortcut which includes examples in JScript and VBScript.

Aha, of course - WSH is the ticket. I will work this out and post the results. Thanks, Leo.