[TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

TC 11.00b4
T="path": Target path, MUST be put in double quotes, and end with a backslash if a directory, or with a file mask with wildcards to rename files

Code: Select all

cm_CreateShortcut /GT="C:\Test\*.link"
It doesn't work like that now. It's a pity.
Last edited by sa16 on 2023-05-24, 18:39 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *Fla$her »

You don't need a mask here: cm_CreateShortcut /GO5T="C:\Test"

There was another problem. The parameters don't work for the "Parameters:" field: /GO5T="%P"
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

T="path": Target path, MUST be put in double quotes, and end with a backslash if a directory, or with a file mask with wildcards to rename files

Code: Select all

cm_CreateShortcut /GT="C:\Test"
This (without \) works, although it should not.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *ghisler(Author) »

cm_CreateShortcut /GT="C:\Test\*.link"
Sorry, I came to the conclusion that this makes no sense, you can't actually open/follow such links.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

This behavior is not consistent with the help:
or with a file mask with wildcards to rename files
Somewhere you need an edit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *ghisler(Author) »

That's because TC appends the missing backslash and *.lnk ONLY in case of cm_CreateShortcut!
When you check cm_copy, the last part without backslash will be taken for renaming.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

I know about it. Help does not know. :)
The description of the parameter T = "path" is common to 3 commands.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *ghisler(Author) »

I will add a note:
For T="path", Total Commander will add a missing \*.lnk to properly name link files.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

Good! At least it will be clear the difference in the behavior of this parameter in the command cm_CreateShortcut from other commands (to those users who look in help).
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: [TC11.00] The cm_CreateShortcut command creates a shortcut with the original file type

Post by *sa16 »

Help wrote:CM_CREATESHORTCUT
...
For T="path", Total Commander will add a missing \*.lnk or \*.*.lnk to properly name link files.
Added to TC 11.00b5. Thanks!
Post Reply