[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: 217
Joined: 2021-09-10, 07:15 UTC

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

Post by *sa16 »

The cm_CreateShortcut command, when specifying a path, creates a shortcut with the original file type (not LNK). Example:

Code: Select all

cm_CreateShortcut /T="c:\test\"
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3295
Joined: 2003-05-06, 11:46 UTC

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

Post by *Sir_SiLvA »

TC 11.00 beta 3, 32 & 64bit:
NOT confirmed.
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2309
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 »

Confirm. At the same time, there is no such problem with WM_CopyData.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6489
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post by *Horst.Epp »

Not confirmed here.
Test case
cm_CreateShortcut /T="d:\test\"
for file t1.txt
creates d:\test\t1.txt.lnk
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
sa16
Senior Member
Senior Member
Posts: 217
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 »

There is a dependence on the method of calling the command: it works correctly from the command line; from the button, start menu - not.
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

it works correctly from the command line; from the button, start menu - not.
Confirmed.

Add the Directory Hotlist to that list where the link is created with the wrong extension.

If I make a Keyboard remapping it works correctly with cm_CreateShortcut as the Command and /T="d:\test\" in the Parameter field.

If I put cm_CreateShortcut /T="d:\test\" into en em_command (em_MyCreateShortcut), then that em_command does not work correctly no matter where it is used


EDIT:

An em_command like this does not work correctly:

Code: Select all

[em_CreateShortcut1]
cmd=cm_CreateShortcut /T="c:\test2\yy\"
Whereas this does:

Code: Select all

[em_CreateShortcut2]
cmd=cm_CreateShortcut
param=/T="c:\test2\yy\"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
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 /T="c:\test\"
This just puts c:\test\ in the name field. When you use cm_CreateShortcut without parameters, you get
c:\test\*.*.lnk instead. So when you use
cm_CreateShortcut /T="c:\test\*.*.lnk"
instead, it will work fine.

I will detect when there is no .lnk and append it myself.
Whereas this does:
No it doesn't, the param field is ignored.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

ghisler(Author) wrote: 2023-05-22, 10:11 UTC
Whereas this does:
No it doesn't, the param field is ignored.
Yes, of course, I just´thappened to have c:\test2\yy\ opened in the other panel when I tested, that's why it seemed to work.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sa16
Senior Member
Senior Member
Posts: 217
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 »

2ghisler(Author)
I did as follows: cm_CreateShortcut /T="c:\test\*.lnk"
Help wrote:T="path": Target path, MUST be put in double quotes, and end with a backslash if a directory
Maybe more understandable, Target path and/or file mask?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
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) »

Maybe like this?
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
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 217
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 »

Yes, of course - the main thing is that the file mask is mentioned.
So everything will be clear.
I will detect when there is no .lnk and append it myself.
Perhaps this should be done only in the case when the mask is not indicated at all.
And add taking into account AppendLnk.
sa16
Senior Member
Senior Member
Posts: 217
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 »

Maybe you should add another parameter for CM_COPY, CM_RENMOV?
R: Keep relative paths (relative to current directory)

Edit:
When copying files from branch view (Ctrl+B).
Last edited by sa16 on 2023-05-24, 07:08 UTC, edited 2 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
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) »

Perhaps this should be done only in the case when the mask is not indicated at all.
How? Is there any use case where a link should have a different extension than .lnk?
And add taking into account AppendLnk.
It will take it into account.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 217
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 »

ghisler(Author) wrote: Is there any use case where a link should have a different extension than .lnk?
I don't know. But this option (to change the extension) is available in the command without parameters (Ctrl + Shift + F5). In my opinion, you should not lose this opportunity in a command with parameters.
Fla$her
Power Member
Power Member
Posts: 2309
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 »

ghisler(Author) wrote: 2023-05-22, 10:11 UTC I will detect when there is no .lnk and append it myself.
Fixed in 11b4.
Overquoting is evil! 👎
Post Reply