[TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

[TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

At some time in the past, i had placed a button in TC's buttonbar with some commands (both TC's and custom), including SaveSelection. The point was to be able to save the list of selected files/folders in a text file. I haven't used it for some time, but today i needed it so i used it. I immediately got the feeling that something was wrong, either with what i have placed in the button or with the SaveSelection command.

I wanted to check it step by step to find out what was wrong, so i went to Help and searched for SaveSelection. I found two references for it (one for SaveSelection and another for cm_SaveSelection). i couldn't find any good info about the syntax for cm_SaveSelection though, so:

1. Is cm_SaveSelection supposed to work like SaveSelection (i.e. cm_SaveSelection <OutputFile>)?
2. Isn't SaveSelection supposed to save to a file only the selected files/folders? If so, there may be a bug in it because (unless i have done something wrong) it seems to save all files/folders to the output file, not only the selected ones. Can someone please verify if it works as it is supposed to?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *ghisler(Author) »

1. No, cm_SaveSelection temporarily saves the selection, which can be restored with cm_RestoreSelection. TC calls cm_SaveSelection before each file operation, so you can restore the selection with "/" on the numeric keypad (which calls cm_RestoreSelection). To save to file, use cm_SaveSelectionToFile, cm_SaveSelectionToFileA or cm_SaveSelectionToFileW. These will always ask the user for a file name.
2. SaveSelection expects a file name as parameter, and saves only the selected file/folder names to that file. I have just tested this and it works in 32-bit and 64-bit.
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

Hi Christian, thanks for the check.

1. There's no mention for cm_SaveSelection in Help, other than the "What's New" section for version 6.0. Perhaps something should be added for it in Help.
2. OK, in my case it doesn't work but as i said, there are multiple commands in that button. I'll try to check what's going on and will let you know if i find anything suspicious.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *white »

wanderer wrote: 2024-12-09, 11:29 UTC 1. There's no mention for cm_SaveSelection in Help, other than the "What's New" section for version 6.0. Perhaps something should be added for it in Help.
Commands are not explained in the Help, but in the command browser. If you press F1 with the command browser open, you can find an explanation of the parameters of the commands that support parameters.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

white wrote: 2024-12-09, 12:40 UTCCommands are not explained in the Help, but in the command browser. If you press F1 with the command browser open, you can find an explanation of the parameters of the commands that support parameters.
Right, thanks for the reminder. The "temporary save selection" in the description leaves the user wondering "where does it save it?". It might be better to be "temporary save selection to memory" and for cm_RestoreSelection "Restore saved selection from memory".
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

wanderer wrote: 2024-12-09, 07:55 UTC2. Isn't SaveSelection supposed to save to a file only the selected files/folders? If so, there may be a bug in it because (unless i have done something wrong) it seems to save all files/folders to the output file, not only the selected ones. Can someone please verify if it works as it is supposed to?
Hi Christian,

A few days ago i sent you an email regarding this issue. Have you received it? Have you been able to detect any issues?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *ghisler(Author) »

No, I didn't receive your mail, sorry. SAVESELECTION only saves the names of the selected files/folders here.
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

ghisler(Author) wrote: 2024-12-18, 11:33 UTC No, I didn't receive your mail, sorry. SAVESELECTION only saves the names of the selected files/folders here.
OK, i re-send it to support@... I hope it reaches you now...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
petermad
Power Member
Power Member
Posts: 16001
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *petermad »

SAVESELECTION only saves the names of the selected files/folders here.
The same here - as always.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: [TC11.50 RC1] SaveSelection/cm_SaveSelection question/possible bug

Post by *wanderer »

petermad wrote: 2024-12-18, 14:11 UTC
SAVESELECTION only saves the names of the selected files/folders here.
The same here - as always.
Yup, i know. I can confirm that too. I sent to Christian a custom command i execute, in which SAVESELECTION is also a part. Within this command, it has a strange behavior (saves all files/folders instead of only the selected). As i said to him, if i have not done something wrong, there may be a bug somewhere.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Post Reply