Multi Commander > Script

Search routine

(1/8) > >>

Ulfhednar:
Decided to attempt a script  -
I decided to try to script a button to search for todays jpgs


--- Code: ---MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg"
--- End code ---

This will get all jpgs in the active pane.  Date & tree-depth aren't pre-loaded.
What I wish to add is the search dialog parameters
a) for today from 00:00:00.
b) to search x subfolder levels.

If it is possible to send values to the search dialog I assume I will need something like

--- Code: ---@var $t = GetTime();
--- End code ---
Then I need to import that & ignore hours/minutes values.
can I EXCLUDE= non $t values or StrIsEqual the 't' to select date matches?

Then I'd want to poke that into the search dialog settings....

That's as far as I have got & it shows how little I have of the language logic at the moment.

But if there was a saved/favorite search function I guess I wouldn't need this :)

Mathias (Author):
Actually you are out of luck :)

The Custom Command for FileSearch do not support date/time matches to be added. (It should, I must have forgot to add it, so I will add it for the next version)

You can load/save searches in the FindFiles Dialog with Ctrl+F1 => F10 (save) and F1 => 10 (Load)
But it will not "reset" the now time for time/date filters so it might not help you completely.

Ulfhednar:
Guess I'm not really surprised I decided to try the impossible, & so it's back to the drawing board for script ideas.... ;D

Good to know about the F1 - F10 feature I hadn't realized that was in there.  That will be useful. Thanks.

How many other features are there I don't know about, I wonder?  :P

Mathias (Author):
latest Beta Build 1442 has better TIME support for custom command MC.FileSearch.Search

Example


--- Code: ---MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg" TIME="TODAY"
// OR
MC.FileSearch.Search SEARCHIN="${sourcepath}" SEARCHFOR="*.jpg" TIMEFROM="2013-01-01 10:00:00" TIMETO="2013-03-04 12:00:00"
--- End code ---

Ulfhednar:
Thanks for the info, I will need to try this out!   ;)

Navigation

[0] Message Index

[#] Next page

Go to full version