Scripted File Search

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
admin
Site Admin
Posts: 66351
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Scripted File Search

Post by admin »

:idea: Inspired by this I just got an idea for a very poweful new feature: Scripted File Search.

It would work very similar to scripted columns:
- Reference to the file in question via special variables, e.g. <fs_item> (fs for "file search")
- use of the "return" command to return the result of the script: 1 (true) = match
- some syntax to reference a script (which should be stored in a file), e.g. "script:cm.xys" or even cooler "xys:cm" which is placed into the Name field in Find Files/QNS.

With SFS you can not only search files by unlimited criteria and logic, you can also easily share those search jobs by simply sharing the XYS files.

Well?

kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Scripted File Search

Post by kunkel321 »

Though this will mostly be above my ability level… . I'd say yes.
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripted File Search

Post by TheQwerty »

Isn't this already possible by using custom columns?

admin
Site Admin
Posts: 66351
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripted File Search

Post by admin »

TheQwerty wrote:Isn't this already possible by using custom columns?
Yes, but this would be without columns. :)

Well, it does not seem to be too popular. No problem, to say it with McLuhan: “You don’t like my ideas? I have others.” :)

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Scripted File Search

Post by Enternal »

I'm curious though. A few months ago I made a script that is used for searching and it's made by creating a search template file and then loading it and then performing the actual search, all through the script file. Is this something like that but much more flexible and user friendly?

admin
Site Admin
Posts: 66351
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripted File Search

Post by admin »

Not really. A search script is a machine which produces a return value for each scanned file you put into it. In your search term you match this return.

For example, take this search term:

Code: Select all

xys:cm:a*
It would feed each scanned file into the script <xyscripts>\cm.xys, and then show the files in the search results if the script return matches the pattern "a*".

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Scripted File Search

Post by Enternal »

I can't think of a good enough use for it yet so I will refrain from making any comments. Hopefully more scripting gurus will voice their opinions.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Scripted File Search

Post by LittleBiG »

admin wrote:With SFS you can not only search files by unlimited criteria and logic, you can also easily share those search jobs by simply sharing the XYS files.
IMHO this statement is true and SFS would be the ultimate solution for searching and be worth to include into XY. And in a real life situation when you realize that the normal search is not enough, the answer will be at hand.

Something came into my mind. Couple of month ago in my huge Downloads folder I tried to detect folders which are contains only 1 folders and no files. (caused by extracting archives which had main folder in the archive). I tried to do it visually by BV. Now I would give it a try with the new SFS. (but wouldn't waste new column for it for sure).

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Scripted File Search

Post by bdeshi »

I don't know about others, but it sounds like an ecciting feature!
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Scripted File Search

Post by TheQwerty »

admin wrote:
TheQwerty wrote:Isn't this already possible by using custom columns?
Yes, but this would be without columns. :)

Well, it does not seem to be too popular. No problem, to say it with McLuhan: “You don’t like my ideas? I have others.” :)
It's not that I don't like the idea, but rather that there are many other ideas which I like more. :wink:

My full thoughts:
  • The need for this is limited.
  • It's complicated and really geared to advanced users (plus scripting isn't free).
  • It is already possible using CCs, so all this does is free up one CC and makes it only slightly easier to share than a snippet+instructions.
  • The introduction of all these variables (<taggeditem>, <cc_item>, <sfs_item>, <pfaitem>) and the inconsistency in underscore usage is unpleasant. They all technically refer to the same thing, this item, but they are used in different contexts making it difficult (okay just annoying) to write a single script that can be used in all cases. It becomes more frustrating when you realize only one of those variables can ever be valid at a given time.
  • It would be more beneficial to more users for XY to support IFilters. We've seen many requests from people wanting to search the contents of files and not being satisfied with the current method.
Thus my opinion is that this is an idea worthy of consideration, in need of some fleshing out, but not yet one which should be implemented.

admin
Site Admin
Posts: 66351
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Scripted File Search

Post by admin »

Okay, I could use <cc_item> also here, why not.

And, IFilter will come first anyway. It's the next big thing I do!

Post Reply