Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
madar
Junior Member
Junior Member
Posts: 5
Joined: 2023-03-04, 09:53 UTC

Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *madar »

Hello,

I really like to use the

Code: Select all

|*.*
mask to select only folders when I copy a folder structure, but no content which works perfectly with "Synchronize Dirs...". It also work in the F5 copy dialog box.
However when I try to use this filter in the Num+ or Num- expand or shrink selection dialog menu, it just returns no "No matches found!"
I have configuration --> options --> Operation --> Selection with Num+ set to select also directories (tested with just files as well, it does not change behavior and it should not matter for shrink at all).
Could you please help me, how I could make my preferred way of filtering work with the expand / shrink dialog box work?

I know that defining a custom filter and saving would be a workaround for this, but as I sometimes add further filters e.g. w*.*|*.bak *.old - I would prefer directly typing it into the filter, then having 10+ predefined scenarios saved.

I already looked on these two threads and was not sure if I should continue the post there, but both of them are partly different topics....
viewtopic.php?t=5507
https://www.ghisler.ch/board/viewtopic.php?t=29058

I am not sure if my intention is clear based on this so I created screenshots for this:
Image: https://imagizer.imageshack.com/img922/1214/Wt0uqb.png
Image: https://imagizer.imageshack.com/img924/8012/mU1tMt.png
Image: https://imagizer.imageshack.com/img922/3307/GGQCQG.png

Thank you for the support.

BR
Madar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *petermad »

I have configuration --> options --> Operation --> Selection with Num+ set to select also directories
With that setting, pressing Num+ equals the command cm_SpreadSelection and pressing Num- equals the command cm_ShrinkSelection

What you need to use is cm_SelectFolders and cm_ClearFolders when you want to only work on folders with the expand or shrink selection dialog.



Here is a list of the different file selection commands and their default hotkeys:

"Expand Selection (as Configured)... - Num+" = cm_SpreadSelection
"Expand Selection (as Configured), Same Extension ..." = cm_SpreadSelectionCurrentExt
"Expand Selection Both Files and Folders..." = cm_SelectBoth
"Expand Selection Only Files..." = cm_SelectFiles
"Expand Selection Only Folders..." = cm_SelectFolders

"Shrink Selection (as Configured)..." = cm_ClearSelCfg
"Shrink Selection Both Files and Folders... - Num-" = cm_ShrinkSelection
"Shrink Selection Both Files and Folders, Same Extension..." = cm_ShrinkSelectionCurrentExt
"Shrink Selection Only Files... - Shift+Num-" = cm_ClearFiles
"Shrink Selection Only Folders..." = cm_ClearFolders

"Invert Selection (as Configured) - Num*" = cm_ExchangeSelection
"Invert Selection Both Files and Folders" = cm_ExchangeSelBoth
"Invert Selection Only Files" = cm_ExchangeSelFiles
"Invert Selection Only Folders" = cm_ExchangeSelFolders

"Restore Selection - Num/" = cm_RestoreSelection

"Select All (as Configured) - Ctrl+Num+ / Ctrl+A" = cm_SelectAll
"Select All Both Files and Folders" = cm_SelectAllBoth
"Select All Only Files" = cm_SelectAllFiles
"Select All Only Folders" = cm_SelectAllFolders
"Select All with Same Extension - Alt+Num+" = cm_SelectCurrentExtension
"Select All with Same Name" = cm_SelectCurrentName
"Select All with Same Name + Extension" = cm_SelectCurrentNameExt
"Select All in Same Path (Branch View)" = cm_SelectCurrentPath

"Deselect All (as Configured)" = cm_ClearAllCfg
"Deselect All Both Files and Folders - Ctrl+Num-" = cm_ClearAll
"Deselect All Only Files - Shift+Ctrl+Num-" = cm_ClearAllFiles
"Deselect All Only Folders" = cm_ClearAllFolders
"Deselect All with Same Extension - Alt+Num-" = cm_UnselectCurrentExtension
"Deselect All with Same Name" = cm_UnselectCurrentName
"Deselect All with Same Name + Extension" = cm_UnselectCurrentNameExt
"Deselect All in Same Path (Branch View)" = cm_UnselectCurrentPath

Notice that Shift+Num+ and Shift+Ctrl+Num+ selects opposite of what is configured (Configuration -> Operation -> Selection (Num +)).


If you don't have dots in your folder names and don't have files without extensions, you can select folders only with *. if Num+ is configured for also selecting folders.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
madar
Junior Member
Junior Member
Posts: 5
Joined: 2023-03-04, 09:53 UTC

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *madar »

Thank you for the detailed answer, I think I will make much use of the detailed list of command you mentioned.

However with Num+ configured as cm_SelectFolders it actually selects folders only, whereas I would like to handle both files and folders all the time the same way. However I tried with configuring Num+ to cm_SelectBoth. This way I would suspect that a press of Num+ selects all the files and folders (which it does), but with a filter of

Code: Select all

|*.*
it should only match the folders, which it doesn't (assuming those have no extension, but files do). I am missing something here with this functionality?

Thanks for the help in advance.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *petermad »

2madar
|*.*
Unfortunately the Expand selection dialog does not support that kind of filters that only have wildcards.

So you have to pick the right variant of the dialog before opening it - that is: whether you intend to act on fils, folders or both.

BTW - in my Extended Menus viewtopic.php?f=6&t=33740 you will find all those different selection methods and more. https://tcmd.madsenworld.dk/markmenu.png
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
madar
Junior Member
Junior Member
Posts: 5
Joined: 2023-03-04, 09:53 UTC

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *madar »

Thank you for the confirmation, I will try your entended menus for this in the future then.
Thanks
Madar
madar
Junior Member
Junior Member
Posts: 5
Joined: 2023-03-04, 09:53 UTC

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *madar »

One more question if you do not mind. Is there a way to recursively copy selected file (and folder) names and path within a folder? I would like to make use of this to have a desciptive file of a complicated folder structure, but with the Mark menu --> "copy selected name and path" I only get the most upper level.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *petermad »

2madar
One more question if you do not mind. Is there a way to recursively copy selected file (and folder) names and path within a folder? I would like to make use of this to have a desciptive file of a complicated folder structure, but with the Mark menu --> "copy selected name and path" I only get the most upper level.
You should do a search for all files in the folder and it's subfolders (default) and then feed that search to listbox (button in lower right corner) - then select the files/folders you want and then copy the selected file names to a file. You can then later retrive that list with the LOADLIST <file> command.
Last edited by petermad on 2023-03-10, 12:12 UTC, edited 1 time in total.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
madar
Junior Member
Junior Member
Posts: 5
Joined: 2023-03-04, 09:53 UTC

Re: Directory select consistency in "shrink / expand selection" vs. folder synch and copy dialog box

Post by *madar »

Thank you again for the helpful reply Petermad, it is a shame that I have not thought of this.
Post Reply