Combining COPY makelink with "noterm"?

Following code doesn't work as intended:

Copy MAKELINK=autonosoft AS "{file|noterm}.lnk"

It works on files, but how can i prevent folders from also getting the .lnk extension?

The .lnk extension only makes sense for shortcuts, so I assume you want to create a shortcut in all situations.

In that case, MAKELINK=autonosoft isn't what you want. Instead, use this:

Copy MAKELINK AS="{file|noterm}.lnk"

That will create a shortcut to the file or folder which is selected, and give it the same name as it (without " - shortcut" on the end).

No, that 's not what i want :confused: Your code isn't using junctions, that's the difference.
If i use the code to link, for instance, "K:\example", i want it to end up as "L:\Example" (where the junction is pointing to).
But that's not the case.

What do you want? You haven't said precisely.

Junctions for folders, shortcuts for files?

Leo, thank you. Not sure, what went wrong in between, but it works now, for both, files & folders.

Are you doing things between the same folders as before?

MAKELINK=autonosoft will behave differently depending on if the source and destination are on the same drive, which may be why you're seeing something different now to before.

Yes, that´s possible. I think, i made a quick test an the same drive, because i restored some settings & had to add this function anew.
Anyway, it works with your code. I used the other one before, because i wasn´t aware, that your code (which is the same as i used before)
also is able to make junctions resp. normal links.

There seems to be a Problem when using noterm,

Select a file 'AAAA.txt' from C drive
Run , COPY MAKELINK TO "C:\Users\Admin\Documents\Folder1" COPYFILETIMES=no
It created a file AAAA - Shortcut.lnk
Again Select the file 'AAAA.txt', from D drive
Again Run the above command, it created another file (also automatically renamed it) -> AAAA - Shortcut (2).lnk

On Using 'noterm',

COPY MAKELINK AS="{file|noterm}.lnk" TO "C:\Users\Admin\Documents\Folder2" COPYFILETIMES=no WHENEXISTS=rename

First time creates the file AAAA.lnk
And second run overwrites the first AAAA.lnk file
WHENEXIST=ask also does not work

Any idea / workaround about it . . . .

That's unrelated to noterm.

If you specify a shortcut name using AS="xyz.lnk", then that's the name that will be used.

Opus only chooses a non-conflicting name automatically if you let it choose the name automatically.

The WHENEXISTS and COPYFILETIMES arguments are not used when MAKELINK is used. They're for normal file copying and don't apply to creating shortcuts.

To create a shortcut using a custom name, adjusting it if there is already a shortcut with the same name, would probably require a short script.

Thanks leo,

So does it mean that, for a file AAAA.txt IF
i want the shortcut to be named as AAAA.txt.lnk [including .txt and excluding -shortcut] using {file|noterm},
there is no simple way to 'either automatically rename the new Duplicate shortcut file' OR 'at least give warning' that duplicate exists,
as done without using {file|noterm}

Perhaps this should be added to the help file. I couldn't find it anywhere, and it would have saved me a lot of testing and searching the forums. :smiley: