Page 1 of 1

[Directors cut coming in 12.50] Select By Type

Posted: 23 Apr 2013 12:39
by Borut
Today I needed to select many files in a folder containing many files of many types, based on file types... So I sorted after extension and carefully selected... (Probably could have used Type Stats Filtering in some intelligent way too.)

In doing that it occurred to me that a nice feature would be the possibility of making selections based on Type Stats: To have a check list presented, having the same contents as the "Type Stats and Filter" button menu and enabling the selection of the items in a list whose types correspond with the checked stat items.

Certainly not an essential functionality, but, well... an idea.

Re: Type Stats Select

Posted: 23 Apr 2013 13:00
by admin
OK, but there are so many ways to select already. What exactly did you have to select? (I wonder if there aren't ways already to do it fast)

Re: Type Stats Select

Posted: 23 Apr 2013 16:47
by Borut
admin wrote:OK, but there are so many ways to select already. What exactly did you have to select? (I wonder if there aren't ways already to do it fast)
I could have used a selection filter with, say, as an example: *.chm;*.exe;*.ini;*.lng;*.ok;*.pdf;*.xyz, but the problem is that although my selections are defined by file types, the types to select are not always the same, neither do I know in advance if some folders contain some other types which I would like to select.

I was thinking of this combined functionality as a way to get the idea about (or to check/control) the file types which are there, as well as to select a subset thereof at the same time.

But, as usual, if no one else shows interest, forget it. This approach is OK with me.

Re: Type Stats Select

Posted: 23 Apr 2013 17:58
by admin
So you wanted to select several types in a list (e.g. all PNG and all GIF)? Yes, I see your idea could be useful. I store it for later. Thanks! :)

(Idea: one might integrate it with Type Stats: hold CTRL or SHIFT to select the files instead of filter them...)

Re: Type Stats Select

Posted: 23 Apr 2013 17:59
by FluxTorpedoe
Hi'
This could be useful once in a while, and after too much :bug: I was in the mood for minigolf, so...

selfilter inputselect("Choose The File Types To Select:", formatList(report("{Dir |*.{Ext}}|"), "dents"), "|", 2, , , , "Select By Type");

It's simple but does the trick... 8)
Flux

// Edit: Dang! Don just beat me to it again! :biggrin:
Minigolf Note: I think someone else had a similar idea for filters a while ago (but I forgot who).

Re: Type Stats Select

Posted: 23 Apr 2013 18:03
by admin
FluxTorpedoe wrote:Hi'
This could be useful once in a while, and after too much :bug: I was in the mood for minigolf, so...

selfilter inputselect("Choose The File Types To Select:", formatList(report("{Dir |*.{Ext}}|"), "dents"), "|", 2, , , , "Select By Type");

It's simple but does the trick... 8)
Flux
WOW, beautiful!! :appl: Kung Fu Scripting!

Re: Type Stats Select

Posted: 23 Apr 2013 18:06
by TheQwerty
In the thread that lead to Don creating type stats I posted a script which allows filtering multiple types and may be useful to you: http://www.xyplorer.com/xyfc/viewtopic. ... 748#p83748

And don't forget you can select one item of each type you want and use the command:
#254 Edit | Select | Select By Selected Type(s) (Ctrl+Alt+M)

The latter is especially useful since you can do it repeatedly to build up the selection.


I might have to spend the afternoon modifying my script to offer a way to filter OR select. Hmmm....

Re: Type Stats Select

Posted: 23 Apr 2013 18:14
by admin
BTW, next version will allow to select files with NO extension using this pattern:

Code: Select all

selfilter "*.", f;

Re: Type Stats Select

Posted: 23 Apr 2013 18:36
by admin
Well, I added it. Was easy and works nicely. No great usability and no feedback about which types are selected, but a cute little hidden trick:

Code: Select all

    + Type Stats and Filter: Now you can use the menu to (un)select 
      files by type.
      - Hold CTRL: Add all files of this type to the selection.
      - Hold SHIFT: Remove all files of this type from the selection.

Re: Type Stats Select

Posted: 23 Apr 2013 21:00
by Enternal
Sweet! :biggrin: This is a very useful feature! Was going to ask about it but since I did get the Type Stats wish granted, thought I should wait a bit longer haha.

Re: Type Stats Select

Posted: 23 Apr 2013 23:21
by Borut
Many thanks for your efforts!

Comments (my very personal and picky ones) follow...

@Don
+ Wow, that was fast and is useful!
- One click too much per selection (in order to reopen the stat menu), but no other way for that solution.

@FluxTorpedoe
+ Don said it all, Kung Fu Script! Wow!!
+ This comes as close as it gets to what I have imagined (buttoned it already for the future).
- Stat not visible by the check boxes, but no other way for that solution. (I regard stats handy for controlling the folders content "normality" at the time of selection.)

@TheQwerty
+ Thanks, your previous script was not known to me.
+ The invert possibility is nice!
- Well, it is a filter and I prefer selection for that particular task (want to see them all at all times, but choose some, although many; do not ask why - must be my psychology :) ).
(BTW, I knew for "Select by selected types" before - am a translator :) - but I regard that as suboptimal for this particular task of mine).

Have a nice <day; evening; night> to all!
Borut

Re: Type Stats Select

Posted: 24 Apr 2013 10:40
by admin
Actually I think I will steal the Kung Fu Script and implement it as Select By Type function and button. In 12.50. :biggrin: