Page 1 of 1
Menu Show - Only selcted files
Posted: 2025-04-10, 11:58 UTC
by Duke
TC 11.51 64-bit in Windows 11
I select a few files and choose in the menu View "Only selcted files". This works without any problems. When I go back to the menu View menu, in menu is mark "All Files"?
If i minimze TC and show the TC window again, the directory will reload and View "Only selcted files" gone, all files show?
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 14:16 UTC
by Fla$her
It's by design. This is a quick filtering, not full-fledged.
For a full-fledged one, you can use this button:
Code: Select all
TOTALCMD#BAR#DATA
cd
%S|*\
wcmicon2.dll,13
Show only selected files
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 14:52 UTC
by petermad
Notice that this will only works is the file names selected, including a space between each file and quotation marks around filenames with spaces is less than 1018 bytes long
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 15:03 UTC
by Fla$her
2petermad
Spaces? 1018? Give me an example. I don't understand what this is about.
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 16:06 UTC
by sa16
Fla$her wrote:Give me an example.
With 10 files with a length of 100 characters, the button works, with 11 - no.
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 16:46 UTC
by Fla$her
sa16 wrote: 2025-04-10, 16:06 UTC
With 10 files with a length of 100 characters, the button works, with 11 - no.
OK. Then why don't we see such notes regarding
other similar solutions?
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 16:52 UTC
by white
This doesn't work if the first selected filename contains a space. For some reason if there is no space after the command "cd" or before the parameter %S, quotes around the first filename get lost when the cd command is executed by TC. Looks like a bug.
Edit:
Bug report created.
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 16:57 UTC
by Fla$her
Yes, this is a bug. Added a space before %S.
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 17:21 UTC
by sa16
Fla$her wrote:Then why don't we see such notes regarding other similar solutions?
There is more size:
History.txt wrote:22.10.19 Added: SELECTFILES command: Support list up to 32767 characters long,
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 17:54 UTC
by Fla$her
It would be wise to bring all commands with parameters to a common limitation.
Re: Menu Show - Only selcted files
Posted: 2025-04-10, 18:19 UTC
by petermad
I have been using: %Z%Y*\ %S for years in my Extended Menus - works fine.
IIRC the 1018 limit is because filters made with the cd command is limited to 1018 bytes.
See also:
https://ghisler.ch/board/viewtopic.php?p=361382#p361382
Re: Menu Show - Only selcted files
Posted: 2025-04-11, 07:16 UTC
by sa16
2petermad
Typo: %Z%Y*\ %S
Re: Menu Show - Only selcted files
Posted: 2025-04-11, 09:01 UTC
by petermad
Typo: %Z%Y*\ %S
Thanks - I have now corrected it here above
While we are at typos - the filter length limit is not 1081 bytes it is 1018 - I have corrected it here above too.
I believe the restriction has to do with the length of the input field in the Custom mask (Ctrl+F12).
Re: Menu Show - Only selcted files
Posted: 2025-04-11, 12:14 UTC
by Duke
Thanks for the workaround!
Re: Menu Show - Only selcted files
Posted: 2025-04-11, 12:30 UTC
by sa16
2Duke
Sometimes, instead of the cm_ShowOnlySelected command, it is convenient to use the cm_DirBranchSel (Ctrl+Shift+B) command.
You can also use Ctrl+Shift+B to return to showing all files (or programs, or files with the latest user-defined specification).