Page 1 of 1

Find Files: Plugins: Batch creation of rules

Posted: 2015-11-29, 11:33 UTC
by DrShark
I suggset to add a possibility to add rules to Plugins tab in batch way for special case when user want to add many rules for one plugin, field and compare operation.

For example, if I want to find files with exact sizes X, Y and Z bytes, I have to create manually 3 similar rules on Plugins tab:
Plugin: Property: OP: Value:
[tc] [size] [=] [X] [bytes]
[tc] [size] [=] [Y] [bytes]
[tc] [size] [=] [Z] [bytes]

I suggest to add to Plugins tab a "Batch" button to call "batch" window with:
Dropdown items:
Plugin:, Property:, OP:
Textbox Values:
X
Y
Z

Each line there to be a value for separate rule.
I don't know how TC manages the [bytes] value thing from my example, but I think it's better to add it to dropdown items.

Pressing [OK] button in this "batch" window will add new plugin rules to Plugins tab of Find Files.

Posted: 2015-11-30, 13:11 UTC
by Hacker
Or add a "Duplicate rule" button perhaps?

Roman

Posted: 2015-11-30, 13:23 UTC
by DrShark
Hacker wrote:Or add a "Duplicate rule" button perhaps?
It will just copy e.g. X value from source rule. Maybe it can be helpful too. However, my suggestion is to allow to set a lot of values at once (textbox with X, Y, Z etc.), then to create rules for all of them in one click.

Posted: 2015-11-30, 13:56 UTC
by Hacker
DrShark,
So the difference is you have to click button 3 times if you want to create 3 rules? Because you have to type X, Y and Z in both cases manually anyways.

Roman

Posted: 2015-11-30, 16:17 UTC
by Lefteous
if could also be a 'special syntax' where you enter as value e.g.:
x y z (where OR is the default operator)
So it would be: tc.full name contains x y z

Posted: 2015-11-30, 17:24 UTC
by DrShark
Hacker wrote:Because you have to type X, Y and Z in both cases manually anyways.
No. In first post I wrote that the field for "X, Y and Z" is a textbox in separate window, for plain text, where X, Y and Z are lines, so I can paste them form Notepad or Excel. Then I press "Create rules" and TC will add 3 rules in Plugins tab: one for "Value:" X, second for Y, and third for Z. "Plugin:", "Property:" and "OP:" fields will be the constant for all.
Lefteous wrote:if could also be a 'special syntax' where you enter as value e.g.:
x y z (where OR is the default operator)
So it would be: tc.full name contains x y z
I fear the length of Value field in plugins tab will be a significant limitation of this solution if X, Y and Z are long strings, even if it will be possible to use such syntax for all wdx plugins (I suspect that currently each wdx plugin is free to parse Value: in its own way).

Posted: 2015-12-01, 08:13 UTC
by Lefteous
2DrShark
I fear the length of Value field in plugins tab will be a significant limitation of this solution if X, Y and Z are long strings, even if it will be possible to use such syntax for all wdx plugins (I suspect that currently each wdx plugin is free to parse Value: in its own way).
That's not how it works. TC asks the plugin for the value and performs the comparison itself. When such a solution is implemented TC would have to split the value field contents based on the input into parts and compare each of them with the value returned by the plugin.
About the limit:
I guess there is a limit but I really don't know it. I just typed 300+ chars in the field. Isn't that enough in most cases?

Posted: 2015-12-01, 10:28 UTC
by DrShark
Lefteous wrote:I guess there is a limit but I really don't know it. I just typed 300+ chars in the field. Isn't that enough in most cases?
Well, for example 2046 characters limitation of the "Search for" field in Find files is not enough for some tasks. The less limitations the final solution will have — the better it will be.

Posted: 2015-12-01, 12:57 UTC
by Lefteous
2DrShark
Well, for example 2046 characters limitation of the "Search for" field in Find files is not enough for some tasks. The less limitations the final solution will have — the better it will be.
For some tasks manually entering values might not be the best solution - especially when it comes to lists.