Visual Filter Addition
Visual Filter Addition
Hello. The current Visual Filters are really nice but what if it can also do this:
It reads all the file extension in the current folder and lists them so that you can quickly select which to filter out. For example, I'm in C:\TEMP\ and there are many files with extension gif, jpg, rar, zip, 7z, ut, and py. XYplorer will automatically read all those extension(s) and when I click on the Visual Filter button, those extensions will automatically show up on the list and I can just simply click the extension I want to filter and show only those extension(s). It's a bit quicker and require less steps especially in folder where certain file extension(s) is little compared to the other files (10 jpg among 1000 exe, 200 png, and etc.). What do you think?
It reads all the file extension in the current folder and lists them so that you can quickly select which to filter out. For example, I'm in C:\TEMP\ and there are many files with extension gif, jpg, rar, zip, 7z, ut, and py. XYplorer will automatically read all those extension(s) and when I click on the Visual Filter button, those extensions will automatically show up on the list and I can just simply click the extension I want to filter and show only those extension(s). It's a bit quicker and require less steps especially in folder where certain file extension(s) is little compared to the other files (10 jpg among 1000 exe, 200 png, and etc.). What do you think?
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual Filter Addition
Possible, but useful? You could also script it.
FAQ | XY News RSS | XY Twitter
Re: Visual Filter Addition
I think it would be useful. There are quite a few times that I browse a certain folder and certain file extension I have not seen before shows up. These folders usually have many many files so I never knew their existence until I accidentally stumbled upon them. Normally you would then type in the file extension into the address bar or use the visual filter to filter them out but I think it would be quicker if XYplorer's Visual Filter already read all the extensions in that folder and listed for you and then allows you to filter them out. Also allows you to know exactly all the extension that's in the folder (quite useful for folders with many files and many types of files). In my case, I have already set up all my "Video," (added a couple more video format than the one that's already included in XYplorer) "Audio," "Archives," and several others but I never knew I also had some extension with tmp, db, lzh, and !ut in that folder until I start manually filter out all the other file types.
Of course I could script it but thought it would be nice if it's part of Visual Filter since it really is an addition to it.
Of course I could script it but thought it would be nice if it's part of Visual Filter since it really is an addition to it.
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: Visual Filter Addition
Hi'
That's one need I didn't think of, but... one's gotta try to be sure! Plus, it sounds fun.
So I just made this quick'n dirty script to get a feel of it (and to bloat my PowerFilter button).
You've probably done one already, but if someone wanna give this idea a try, here it goes:
Have a nice day,
Flux
Edit: Added "Cancel" to popupmenu
That's one need I didn't think of, but... one's gotta try to be sure! Plus, it sounds fun.
So I just made this quick'n dirty script to get a feel of it (and to bloat my PowerFilter button).
You've probably done one already, but if someone wanna give this idea a try, here it goes:
Code: Select all
"Filter by List of Extensions"
$FileInfo = report("{Ext};{Name}<crlf>");
$FilterList = "|";
foreach($item, $FileInfo, "<crlf>") {
if $item {
$FileExt = gettoken($item, 1, ";");
if ($FileExt && ($FilterList UnLike "*$FileExt*")) {
$FilterList = $FilterList.$FileExt."|";
}
}
}
$FilterList = trim(formatlist($FilterList, s, "|"), "|")."|-|Cancel";
$Ext = popupmenu($FilterList);
if ($Ext && ($Ext != "Cancel")) {
filter "*.$Ext";
}
Flux
Edit: Added "Cancel" to popupmenu
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
Re: Visual Filter Addition
My mini-golf attempt ended up being a pretty powerful one-liner:If you run it when the list is in Drives mode (viewing Computer) you can use it to select drives, and it defaults to including all folders as well.
EDIT: Don, it would be pretty awesome if Filter() could add to the existing visual filter instead of always overwriting it.
Code: Select all
Filter(InputSelect('Extensions (or Drives) to display:',FormatList(Report('{Dir +\|{Ext}|{Name}}|'),'dents'),'|',2));
EDIT: Don, it would be pretty awesome if Filter() could add to the existing visual filter instead of always overwriting it.
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual Filter Addition
Wow, awesome one-liner!TheQwerty wrote:My mini-golf attempt ended up being a pretty powerful one-liner:If you run it when the list is in Drives mode (viewing Computer) you can use it to select drives, and it defaults to including all folders as well.Code: Select all
Filter(InputSelect('Extensions (or Drives) to display:',FormatList(Report('{Dir +\|{Ext}|{Name}}|'),'dents'),'|',2));
EDIT: Don, it would be pretty awesome if Filter() could add to the existing visual filter instead of always overwriting it.
Awesome wish: well, maybe later.
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual Filter Addition
I now see the use of this feature. Something like this (a little enhanced even) will come.
FAQ | XY News RSS | XY Twitter
-
- XY Blog Master
- Posts: 5824
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
Re: Visual Filter Addition
Good! I'd thought about this quite some time ago but never posted as wish...at that time, I was trying to locate the very few files in a large folder that were the "abnormal" types for that folder...hard to spot when only one or two of them among hundreds and when you don't know what types they are.admin wrote:I now see the use of this feature. Something like this (a little enhanced even) will come.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
Re: Visual Filter Addition
Not quite.. I realized I wasn't truly filtering by extensions so it would include "atxt.ini" when filtered by "txt". So a better one-liner would be:admin wrote:Wow, awesome one-liner!
Code: Select all
Filter(InputSelect('Extensions (or Drives) to display:',"+\|".FormatList(Report('{Dir |*.{Ext}|{Name}}|'),'dents'),'|',2));
I thought you would say this which is why I tried to code around you.admin wrote:Awesome wish: well, maybe later.
It's no longer a simple one-liner (off by 56) but it lead to an interesting and perhaps useful script, that includes the ability to invert the filter or include existing filters. I imagine it won't work well if you start with a complex visual filter as I make some assumptions, but if you're just using this script over and over it should do okay.
- Attachments
-
- FilterExts.xys
- (1.7 KiB) Downloaded 331 times
Re: Visual Filter Addition
Wow, so many scripts already! Glad Don can see the usefulness of it already so it would be nice to have something like this directly implemented in the Visual Filter. Also wow, there's a lot of simpler ways of doing things looking at all those scripts. I never script before so this would be my first time but I was using the regexmatch and been messing with all those regular expressions... what a pain.
Anyway, TheQwerty, your long script also works really well but I think it would be really nice if you have the icons shown so that you know if there's any potential program association with those extensions. Of course, it's simply:
Changed to
Anyway, TheQwerty, your long script also works really well but I think it would be really nice if you have the icons shown so that you know if there's any potential program association with those extensions. Of course, it's simply:
Code: Select all
#HEREDOC , $vfitems,'|', 2, /*cancel*/, /*w*/, /*h*/,'Filter by Extension+');
Code: Select all
#HEREDOC , $vfitems,'|', 2+1, /*cancel*/, /*w*/, /*h*/,'Filter by Extension+');
-
- Posts: 855
- Joined: 05 Oct 2011 13:15
Re: Visual Filter Addition
And it put my maxi-golf to shame! I definitely lost my (w)edge...TheQwerty wrote:My mini-golf attempt ended up being a pretty powerful one-liner
Well, that'll teach me to recycle code mindlessly: the whole foreach+ was literally useless in this case (and the rest coulda been streamlined), my bad.
Anyway, I'm glad your script taught me the {Dir ...} template for report(), powerful...
and the versatility of the formatlist I'd overlooked - I'm gonna love your "dents"!
• Scripts: Session Manager | SlideShow | Collection Manager | Power Launcher | Akelpad syntax highlighting | ...
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Visual Filter Addition
Upload in a minute. "Type Stats and Filter". Let me know what you think. I certainly have use for it.admin wrote:I now see the use of this feature. Something like this (a little enhanced even) will come.
FAQ | XY News RSS | XY Twitter
Re: Visual Filter Addition
I like.admin wrote: "Type Stats and Filter". Let me know what you think. I certainly have use for it.
Cheers,
Filehero
PS: .... slowly I do see what the ribbon approach can be good for ("Search and Filters").
Re: Visual Filter Addition
i find this function useful too. only one thing: why that large name, and not something simple, like "Files Filter"?
Win 7 SP1 x64 100% 1366x768
Re: Visual Filter Addition
Wow. It's amazing! The ability for it to list how many files of each types is actually a really good and amazing idea! Never even thought about that.
Would it be possible to choose our own sorting of the file types though? Anyway, good job!
Would it be possible to choose our own sorting of the file types though? Anyway, good job!