Filter by Column : Powerful filtering/searching tool for all columns

Filter by Column is a script command for Directory Opus, who makes it easy to quickly filter the current file display, based on almost any column content.
It can be used either as a regular Directory Opus command, an interactive filter with UI or as a FAYT command.

Its main features are:

  • Filtering by almost all built-in Directory Opus columns.
  • Filtering by Script, Evaluator and Shell columns.
  • Search Mode, that allows you to perform an advanced recursive search with the same parameters instead of filtering.
  • Define custom names to refer to a specific column.
  • Filtering/Searching by columns even if they are not used (visible) in the current file display.
  • Support for the following flags: ignore diacritics, case-sensitive, whole words and regular expressions.
  • Support for filtering items in expanded folder.
  • Specialized syntax according to the column data type (date, number, size, duration and text).
  • Filtering can be performed on any column, either referring explicitly to the column number position, the custom name given to an specific column, or implicitly by "Name" column, current sorting column, highlighted column or any user-defined column.
  • Option to define the data type for Script, Evaluator and Shell columns.
  • Quick flags configuration from the same command.
  • Can be used as well as a command (a.k.a. Command Mode) or as a FAYT script (a.k.a. FAYT Mode).
  • Interactive Filter with UI, with same filter syntax support. (a.k.a. Dialog Mode)
  • Support for multi filtering based on more than one column, when used in Command Mode or FAYT Mode.
  • Support for command input history.

FAYT Mode Example :


(simple filtering)


(filtering with support for nested results)

Dialog Mode Example :

How to Install

Download the file below. Then double click the file or run Prefs SCRIPTINSTALL and select the downloaded file.
:warning: IMPORTANT: Needs at least Directory Opus v13.5.1

v1.6.1 : FilterbyColumn.opusscriptinstall

Script Configuration

This are script options that applies to all the existing modes. In the Script Management window (Settings / Scripts). Select Filter by Column and click in the gear icon.

They are divided into groups, depending which mode may apply:

collection name General Collection name for the search results.
create subcollections General Create sub-collections instead of overwriting search results.
custom_columns_categories General

Here you can define the type of data that a column returns. Used for Script, Evaluator and Shell columns.
Format: "name":"type"
name must be the same value as the column keyword.

type can be string, date, duration, number or size.
(Type the quick key twice successively and then press Return to quickly find out the name of all currently visible columns.

custom_columns_names General Define custom names to refer to a specific column, using the following syntax:
"mycolname":"col name";
Where mycolname is the actual column keyword. (Press this command's quick key twice to show a list of current column's keywords.
Don't use any operator (&&,||,<,<=,>=,>,= or !) for mycolname value.
log level General Logging level to be displayed. OFF to show only errors.
DEBUG to show all messages.
STANDARD to show only the most relevant information.
WARNING to show messages that needs your attention.
flags_quickkey FAYT Mode This option allows you to set the same flags without going all the way through Preferences > Filtering and Sorting > Quick Keys, simply by typing in the FAYT bar the character configured in this option. By default is set to ?.
default_implicit_column FAYT/Command Mode If a column is not explicitly specified, choose between filter by name, current sorted column, current highlighted or user_defined_implicit_column value.
enable_wilcards FAYT/Command Mode Set to True to enable compatibility with Opus standard pattern matching and/or want to use Textual Filters exclusively for FAYT/Command Mode.
user_defined_implicit_column FAYT/Command Mode In implicit mode, filter by this column, if it exists. If not, the Name column will be used.
max_history_size FAYT/Command Mode Maximum number of entries to be remembered.
preferred_filter_mode FAYT/Command Mode Choose the method to use when filtering/searching on a Script, Evaluator or Shell column.
show nested results with Textual Filters FAYT/Command Mode Enable support for showing nested items in results when using Textual Filters. This makes the operation take longer to finish.
add column FAYT/Command Mode Add the referenced column to the results tab after the search.
custom columns obtention Dialog Mode Choose the method to get values for Script, Evaluator or Shell columns.

Textual Filters: Faster, no temporary files.
Rename Preset: Bit slower, with temporary files. May give more consistent results. Allows nested items matches.

list Evaluator columns Dialog Mode List in DIALOG all Evaluator Columns.
list Script columns Dialog Mode List in DIALOG all Script Columns.
list Shell columns Dialog Mode List in DIALOG all Shell Columns.

Usage

Filter by Column can be used in three modes : FAYT Mode, Command Mode and Dialog Mode.

  • FAYT MODE allows you to use it from the FAYT bar, being able to filter/search in the current file display with the specialized syntax.

    • Filter submode is the default state, and acts similar to the regular Filter FAYT, but with many more options, makes it easy to quickly filter the current file display by any property, even if its column is not visible (if not referenced by its position).

    • Search submode lets you perform an advanced search, using the same search parameters than the filter, but recursively, including all subfolders. The results are open in a collection in a new tab in destination.

  • COMMAND MODE allows you to use as a regular DOpus command, from a button, menu, etc. It has the same syntax as the FAYT mode and the same sub-modes.

  • DIALOG MODE is the interactive version of the command. It has a simple UI, which allows real-time filtering, presenting the current values as selectable entries, for any available column.

Syntax

Columns can be referenced in two ways : implicitly or explicitly.

Explicitly: By using the following syntax:

  • Cnumberoperatorquery
    number refers to the position that the column occupies in the current file display, starting from 1. If the first column is the Index(#) column, it is omitted from calculation.
    e.g. C2=tag1

  • mycolnameoperatorquery
    mycolname refers to the custom name given by the user in custom_columns_names in Script configuration.
    e.g. mycustomcoldate=today

Implicitly:
If none of the above syntaxes are used, it means that the column to be filtered is implicitly referenced.

  • The column used will be choosed based on the default_implicit_column value.
  • In this mode, the '=' operator is implied (when used as a equal/not equal comparison).
    e.g. txt ; !Dop ; > 30 mb

Operators:

Valid operators are = (==); !=; <; <=; > and >=. When the column is of type 'string', the valid operators are = and !=. For all other types, all operators apply.

Query:
query has specialized syntax according to the column data type:

Date :

  • today, tomorrow, yesterday (yday), thisweek(week), lastweek(lweek), thismonth (month),lastmonth(lmonth),thisyear(year),lastyear(lyear)
  • Text in the format yyyy, MM (to refer to a month of this year) or MM-yyyy
  • [day]d Filter only by day value shown, regardless of the other values
    e.g. C2=12d will match both 12-12-2023 and 12-03-2021 values
  • [month]m Filter only by month value shown, regardless of the other values
    e.g. C2=11m will match both 12-11-2023 and 12-11-2021 values
  • [x]ha|da|ma|ya Filter for [x] hours|days|months|years ago from current date.
    e.g. C2>=11da will match all values 11 days old from current date.
  • Times can now be taken into account when comparing, if the input contains them.
  • HH:mm or HH:mm:ss Filter only using the time value
  • Date in format dd-MM-yyyy HH:mm:ss or yyyy-MM-dd HH:mm:ss (also without the seconds)
  • Text in date format supported by Date Object
    e.g. C2 > 2023/12/12
  • The following syntax, when using with = or != operator, have support for ranges (using .. as separator between both limits):
    • [day]-[day]d
    • [month]..[month]m
    • yyyy..yyyy
    • MM/yyyy..MM/yyyy
    • dd-MM-yyyy..dd-MM-yyyy or yyyy-MM-dd..yyyy-MM-dd
    • dd-MM-yyyy..dd-MM-yyyy HH:mm:ss or yyyy-MM-dd..yyyy-MM-dd HH:mm:ss (also without the seconds)

e.g. 10-12d; 2000..2023; 7/2021..11/2023; 8-1-2024 1:34..23-1-2024 2:19

Size :

  • number bytes|kb|mb|gb|tb|pb
    e.g. C3>4mb ; C2<=100 kb
  • In conjunction with = or != operators, you can use notation for ranges using .. or - between both limits (inclusive)
    e.g. C3=2mb..3.5mb

Number:

  • In conjunction with = or != operators, you can use notation for ranges using .. or - between both limits (inclusive)
    e.g. C2=4-7

Duration :

  • HH:mm:ss , mm:ss or any integer referring to total seconds
    e.g. C5=1:10:00 ; c5 > 20
  • In conjunction with = or != operators, you can use notation for ranges using .. or - between both limits (inclusive)
    e.g. C2=4-7 (meaning seconds) ; c2=1:10:00..2:20:00

Comparison with other value : (Not available in Dialog Mode)

You can compare a column's value with the value of another column, using the following syntax:

colnameoperator{othercolname}
colname can be the column keyword or a custom name (or be ignored in implicit mode).
{othercolname} is a column keyword (only built-in ones are supported). Supported columns are accesible as suggestions in FAYT Mode.

Searching by Filetype Group

Finally, as a bonus, when you filter by Name column, you can refer to any of your file type groups registered, using [grp]:query, where:

  • [grp] use (kind of) fuzzy match for all your registered file type groups. e.g. img will match Image file type group. Note that for matching, it will use the displayed (translated) name for that group.
  • query It's used to filter for all files whose name match with query and belong to the specified file type group.

e.g. img:abc will match all files whose name contains abc and belong to filetype group Images.
doc: will match all files who belong to file type group Documents.

FAYT Mode

Configuration

First open Preferences. Then navigate to Filtering and Sorting / Quick Keys (or use Prefs PAGE=quickkeys) and change the assigned quick key. Change the hotkey to the one of your choice. By default it is set to $.

Script Flags

In that same section, you can change some options too. Open the Filter by Column menu and check/uncheck according to your needs.

Case sensitive Self explained
Regular Expressions Self explained
Ignore diacritics Self explained
Whole words Self explained
Ignore undefined values Certain files may not have data in some columns. For example, a jpg file cannot have data in the "Duration" column. By enabling this option, when a filter operation is performed, the type of metadata a file may have and whether the info exists or not is taken into account for their inclusion in the results. 
Filter only what is visible When filtering, only take into account the current visible items. Otherwise filtering include hidden items as well.
Search Mode Allows to perform a search instead of a filtering, using the same parameters.

Filter by Column can be used in two submodes : Filter Mode and Search Mode.

To enable it, you can either check the flag Search Mode (this will make the default mode), or invoking by double typing your configured quick key for the command (e.g. $ $)
Note that this acts as a toggle, that is, one $ to invoke the default mode, and two $ $ to invoke the other, depending on the value of Search Mode flag.

You can check some examples in the Examples section.

Command Mode

Filter by Column can be used with the following arguments :

Arguments

Argument Type Values Description
CONFIG /S (no value) Easy access to Script Configuration dialog.
EDITCATEGORIES /S (no value) Shows the Edit Categories dialog, in order to edit column's types stored in DIALOG mode.
CASE /S (no value) Enable case matching.
REGEXP /S (no value) Enable regular expressions.
NODIACRITICS /S (no value) Ignore diacritics.
WHOLEWORDS /S (no value) Only match whole words.
USEWILD /S (no value) Enable use for DOpus standard pattern matching. This will derrogate functions to Textual Filters exclusively.
IGNOREEMPTY /S (no value) Ignore undefined (empty) values when filtering/searching.
FILTER /O (no value) Enable Filter SubMode. Otherwise Search SubMode is active.
visible Filter using only the current visible items.
MULTI /S (no value) Enable multi column support. You can use && and || as logical operators and parenthesis when needed.
Use double quotes to escape literal characters that otherwise has an special meaning for the command.
DIALOG /O (no value) Enable Dialog Mode. With no other value provided, it will start with the 'Name' column.
filterall Use all the available items at start. Otherwise it will use only the visible ones.
column keyword
column index
custom column name
Use any column keyword, column index or custom column name to start the dialog with that column.
QUERY /K/R  

Set the query to use for filter/search. Everything after this argument will be considered part of the value (no quotes needed).

e.g. FilterbyColumn QUERY c1=dop

Dialog Mode

This is the ultimate filtering tool! It allows interactive and real-time filtering and provides quick options to select items based on the value of the specified column.

Usage

You can add this buttons to your column header context menu, for easy access:

Filter by '%1'.dcf (475 Bytes)

The dialog reads all available values for the specified column and displays them in selectable options. Pressing the checkbox (or double-clicking the value in the list) will filter the items that have the specified values in the tab.

You can filter the values from the dialog list using the filter box.

In addition, you can select the type of filtering by clicking in the Filter Options icon : Using FAYT syntax or as text only.

Script columns must be registered first to be able to use the FAYT syntax. To do this, with the target column, select in the category combobox the desired type (string, number, date, size, duration) and click on the save category icon (the floppy icon).

You can switch to any other column (except Script, unless you have started with that column), using the name combobox at the top. This combobox also acts as a search filter, using the column label.

When searching a column of type 'string' or filtering as text, you can apply certain options, such as regular expressions, case match, whole words, and use diacritics.

Of the 4 lower buttons, the first 3 allow you to make changes to the selected values.

  • Use the first to select all entries (or use Alt+1).
  • Use the second to invert the selection (or use Alt+2).
  • Use the third to deselect all (or use Alt+3).
  • The Refresh list button (F5) allows you to synchronize the values with those of the current tab, but only in case items have been added (or a folder has been expanded). If you want to reread all the values, you can refresh the tab and the dialog will synchronize automatically.

Press the Save to Collection icon to save the visible items to a collection (following the rules for collections in the Script Configuration).

The Edit categories icon, allows you to modify or delete the categories saved within the dialog.

The dialog allows you to use the Lister on a regular basis, and even switch to other tabs. Note the following cases:

  • If you switch to another tab, or to another Lister, the dialog is disabled. It is re-enabled when you return to the target tab.
  • If you close or change the path in the tab, the dialog is closed.
  • If you refresh the tab, the dialog is automatically synchronized with the new data.

Some columns (like tags, label, artists or attributes) that can had multiple values, are handled differently by the command, allowing filtering by choosing any of them individually, as well as being able to decide whether only one or all of the selected options should be present or not when filtering (using the Use AND checkbox).

By default, values for custom columns are retrieved via Rename Presets. You can change to Textual Filters, changing custom columns obtention in Script Configuration.

Finally, the :no_entry_sign: button lets you 'ignore' all undefined values when filtering, similar to Ignore undefined values flag in FAYT Mode, but in runtime.

FAQ

This FAQ was mostly developed based on the use in FAYT Mode, but certain parts (such as the settings) affect the other modes.

For simplicity, let's assume that the assigned quick key for this command is $, and that the filter is not the default one.
If you've changed the assigned quick key to another one, replace any occurrence of $ in the directions above with your new assigned key.
If you set this filter as default, usually is not longer needed to type $, unless you want to use another characters who is currently in use as a quick key for another filter. For using the non default mode, $$ is always required.

Click to show section

How to get a column name

E.g. User Description column

  • First, add the column to your current file display.
  • Now type in the FAYT bar: $$ and press Return.
  • The Script Log will open if not visible. In there you can see a list of all visible columns. Copy the value after "Name : " from the target column.
  • You can easy recognize the target column by its header value.

How to register a custom name

  • First you need to know the name for the column you want to use. (How to get a column name).
  • Now go to the Script Management window (Settings / Scripts). Select Filter by Column and click in the Edit button.
  • In the new open window, double click in custom_column_names. Then in that window add the following at the end, in a new line: "custom name":"column name"
    custom name is the name you want to use to refer that column from now on. Change to your like. Remember this value is case sensitive, so custom name is different than Custom Name.
    column name is the column's internal name you just copied.
    Remember that the syntax must include the quotes and the colon in between.
    e.g. "desc":"userdesc"

image

  • Click OK button in all opened windows to save your new values.

How to register a custom category

Custom categories are used for Script, Evaluator and Shell columns only, in order to let this command know what type of data a given column handles.
Usually, Evaluator columns don't need to be registered, as the command automatically reads that data from the column data, but you can register a category if you want to replace that value with another one.
Any unregistered column is considered by default as text (string).
To register a category :

  • First you need to know the name for the column you want to use. (How to get a column name).
  • Now go to the Script Management window (Settings / Scripts). Select Filter by Column and click in the Edit button.
  • In the new open window, double click in custom_column_categories. Then in that window add the following at the end, in a new line: "column name":"category"
    "column name" is the column's internal name you want to register.
    "category" valid values are string, number, date, duration or size.
    Remember that the syntax must include the quotes and the colon in between.
    e.g. "scp:col_search_test/tam":"size"

image

  • Click in OK in all opened windows to save your new values.

How to configure flags

Current available flags are described here.
You can configure this in Preferences / Filtering and Sorting / Quick Keys:

or by typing in the FAYT bar $+? and pressing Return.

flagsdialog

How to change between Filter and Search modes

$ acts as a toggle for Filter Mode and Search Mode.
$ to use the default mode
$$ to use the non-default mode.

By default Filter Mode is the default. Search Mode will be the default mode if you enable Search Mode flag.

Examples

Click to show section

Context : Filter Mode is set as the default mode.

Example 1

Filter all items in the current file display whose User Description column value contain "Grumpy Cat". I want to create a custom name for that, so I can use mydesc=Grumpy Cat.

Procedure

  • In order to refer a column by its name. first we need to check if it's registered under custom_columns_names in Script Configuration.
  • If it's not there, we need to first know its internal name. (How to get a column name), which is userdesc.
  • If is not already registered, we do it using "mydesc":"userdesc"(How to register a custom name).
  • 'User description' is a built-in column, so no need to register a custom category.
  • Since we want to find "Grumpy Cat", but no "grumpy cat", check in flags Case sensitive.
  • Type $mydesc=Grumpy Cat

Example 2

Filter all items in the current file display whose 'User description' column value matches exactly "Grumpy Cat".

Procedure

  • Perform the same steps as the previous case regarding the prior registration.
  • Check in flags Case sensitive and Regular Expressions.
  • Type $mydesc=^Grumpy Cat$

Example 3

Search for all items in the current source folder and its subfolders whose custom script column named My Date has a value of 3 months ago or later, from the current date.
I want to refer to this column as mydate.
Procedure

  • In order to refer a column by its name. first we need to check if it's registered under custom_columns_names in Script Configuration.
  • If it's not there, we need to first know its internal name. (How to get a column name), which is scp:mycoldate/mycoldate.
  • If is not already registered, we do it using "mydate":"scp:mycoldate/mycoldate". (How to register a custom name).
  • My Date is a script column that I want to be recognized as date, so I need to register it (if it's not already) in custom categories using "scp:mycoldate/mycoldate":"date". (How to register a custom category)
  • Type $$mydate>=3ma

Example 4

Search for all items in the current source folder and its subfolders whose custom script column named My Date has a value not included in the interval between Feb 2,2001 09:54 and Dic 3, 2004 19:55. I want to refer to this column as mydate.

Procedure

  • Perform the same steps as the previous case regarding the prior registration.
  • Type $$mydate!=2-2-2001 09:54..3-12-2004 19:55

Example 5

I want to use the value from the 'Tags' column whenever filtering/searching implicitly. For example, to filter to filter all the items in the current file display that contain 'cat' in its tags

Procedure

  • We need to know the internal name used for Tags column. which is keywords (How to get a column name).
  • In Script Configuration, change default_implicit_column to user_defined_implicit_column and set user_defined_implicit_column to keywords.
  • Type $cat
  • You may want to check other flags, like Whole words to only match complete tags.

Notes

  • The command implements two ways to get values in custom columns (in all modes) : via Textual Filters and through the abuse of Rename Presets. preferred_filter_mode allows to choose the method to use for FAYT/Command mode. custom columns obtention for Dialog Mode. Each method has its pros and cons.
    • Textual Filters :
      • It is faster, no temporary files are created or used.
      • Support for nested results (either from an expanded folder or grouped flatview) is granted when show nested results with Textual Filters is set to true.
    • Rename Preset :
      • It is a bit slower, temporary files are created/used.
      • Support for nested results out of the box.
  • If you set enable_wilcards to True, that will automatically mean to always use Textual Filters in FAYT/Command mode.
  • Search Mode always use Textual Filters.
  • The command is not enabled on sites perceived as 'Shell' type (e.g. This PC) or on MTP or FTP or PLUGIN.
  • Unsupported columns are as follows:
Unsupported columns
	'group':
	'md5sum':
	'shasum':
	'blake3sum':
	'crc32sum':
	'sha256sum':
	'sha512sum':
	'thumbnail':
	'status':
	'sizerel':
	'disksizeauto':
	'disksize':
	'disksizekb':
	'disksizerel':
	'uncompressedsize':
	'dircount':
	'dircounttotal':
	'filecount':
	'filecounttotal':

Changelog

v1.6.1 (Apr 21, 2024) : ColSearch.opusscriptinstall (39.7 KB)

  • Fixed some empty values not allowing to unhide items in DIALOG mode.
  • Improvements when selecting items in DIALOG mode.
  • Code updated/cleaned up.
  • Better logging system.

v1.6.0 (Apr 13, 2024) : ColSearch.opusscriptinstall (39.5 KB)

  • GENERAL:

    • Dialogs will now use the font style and size you've set up in Preferences / Colors and Fonts / Fonts > Dialogs.
    • Now you can see matches for nested items within a library, whether it's in an expanded folder or in grouped flat view.
    • Changed the command label because it was too long.
  • FAYT/COMMAND:

    • Textual Filters now support showing matches for nested items. To enable this, set nested results with Textual Filters to true.
      • Just a heads-up, this might slow down the operation significantly. (workaround is not good enough but it works :slightly_smiling_face:)
    • Multi mode is now accessible via FAYT mode by turning on the Multi Mode flag.
    • In Multi Mode, if only one column is used, it switches back to the regular procedure, which can be faster in some cases.
    • Added a busy indicator during filtering, allowing you to cancel the operation if it's taking too long.
    • New arguments in COMMAND mode : CONFIG and EDITCATEGORIES.
  • DIALOG:

    • Script columns can now be listed during initialization.
      • This includes automatic recognition of the data type, providing general benefits. For example, you won't need to register the column type if the dialog has been initialized at least once, unless you want to change the registered type.
    • Added new entries in Script Configurations: list Script Columns, list Evaluator Columns, and list Shell Columns, to toggle the listing of these columns during dialog initialization. (Useful if you have a large number of columns of a certain type, as listing them all could slightly delay the display of the dialog.)
    • Changes made to the 'Refresh' button in the dialog. It now always displays all items in the tab and syncs them with the dialog (previously, it was a bit confusing regarding which items to show).
    • Checked values are now remembered under certain circumstances (e.g., when changing/editing a category).
    • Columns with the same header are now suffixed with their keyword, preventing overlap and allowing all supported columns to be listed.
    • All item labels, even non-explicit ones, are now listed.
    • Fixed filtering issues with nested items.
    • The dialog now avoids continuous calls for the same tab.
    • Fixed some issues with edited categories been replaced when listing custom columns.
Full changelog

v1.5.0 (Apr 04, 2024) :

  • GENERAL :

    • Introduced new Dialog Mode.
    • New option in Configuration : enable_wilcards : Allows to use Opus Standard Pattern Matching (only in text type values).
    • Wildcard escape flag and use_filter_builtin were merged to avoid contradictions.
    • Now you can check if a column has data or not, regardless of its type. For that simply use colname=="" or colname!="".
    • You can now compare one column with another (not available in Dialog mode). To do that use colnameoperator{othercolname}
    • Improved logic when you want to ignore unavailable (undefined) values. Should now work in all modes.
    • Improved filtering of nested items (either by expanded folders or grouped flat view) in all modes (except where Textual Filters are used, there is no possibility in there). Now the command is able to show matches in these cases, showing also the ancestor folders.
    • Improved conversion and comparison of columns set as number, in all modes. Decimals are now correctly taken into account.
    • Some changes in the code to support the new features.
    • Other minor fixes.
  • FAYT :

    • Renamed flag Ignore non qualified items to Ignore undefined values.
    • New value for default_implicit_column : current highlighted , which allows implicit reference to the first selected column. To do this, the whole column must be selected beforehand, using right click + Ctrl.
    • New Flag : Filter only what is visible, allows to apply the filter only on the currently visible items. useful if you want to apply 2 filters in a row (one on the results of the other).
  • COMMAND :

    • Removed ESCWILD argument.
    • New argument USEWILD, to enable the use of wilcards in command mode.
    • FILTER has a new value : visible, to mimics Filter only what is visible flag but for command mode.
    • New argument : IGNOREEMPTY, similar to the Ignore undefined values flag. Can be combined with other arguments.
    • New argument : DIALOG, shows a dialog that makes the filtering process easier (The ultimate Excel-like filter function!).
    • New argument : MULTI, allows you to perform a multi filtering/search, referencing one or more columns, using logical operators && or ||.
      • In this mode, Evaluator and textual filters are used exclusively. (so no nested results are available)
      • You must use parenthesis where applicable. To search for an operator or literal parenthesis, enclose the values in double quotes.
      • E.g. FilterbyColumn MULTI QUERY ext==exe && created>lastyear

v1.4.2 (Mar 13, 2024) :

  • Fixed printing columns information being broken in v1.4.1.

v1.4.1 (Mar 10, 2024) :

In all cases where Evaluator is used:

  • Fixed incomplete results if in some cases you searched only by date without time.
  • DOpus standard pattern matching can now be used properly (if regular expressions are not enabled).
  • Also, now there is a new flag, to escape wildcard characters when you don't want to use it (if not enabled and regular expressions is disabled, it escapes characters for regular expressions).

FAYT mode:

  • Improved detection when displaying suggestions (hopefully this is fixed for good).

Command mode:

  • Added new argument : ESCWILD, to escape characters that can be interpreted as wildcards (applicable for cases where Evaluator is used).

v1.4.0 (Mar 06, 2024) :

  • Now you can use FilterbyColumn as a command too. Valid args are FILTER, REGEXP, NODIACRITICS, WHOLEWORDS, CASE, and QUERY.
  • Now you can use column's keyword to refer a specific column, without previous name registration.

v1.3.3 (Mar 03, 2024) :

  • Updated to work with the changes introduced in 13.3.2 (mostly affects when the script is the default filter).
  • Added a new log level, Standard

v1.3.2 (Feb 24, 2024) :

  • Now, the column doesn't need to be visible when filtering/searching and not using a position-based column reference(e.g. C1, etc.)(there's no longer Filter even if no visible flag).

v1.3.1 (Feb 22, 2024) :

  • Introducing 'Search Mode' flag, to perform a recursive search in the current source folder, using the same filter and parameters.
  • Enabled filtering by filetype group when using Search Mode.
  • $ $ (or your configured quick key) works as a toggle between filtering and searching.
  • Search Mode has several options for configuration (collection name, use subcollections, add column).
  • Added range search for dates with the format:
    • dd-MM-yyyy or yyyy-MM-dd
    • dd-MM-yyyy HH:mm or yyyy-MM-dd HH:mm
    • dd-MM-yyyy HH:mm:ss or yyyy-MM-dd HH:mm:ss
  • Improved logic when searching by date ranges.
  • Improved parsing of custom categories and custom names.
  • Improved dialog for configuring flags. Now keyboard accelerators can be used. (also no more minimized listers).
  • Improved suggestions when typing. Now all the custom names are included as suggestions, accesible for both Filter and Search Mode.
  • Now custom names are case sensitive.
  • Evaluator columns doesn't need to declare their type (date, number, etc), since is readed from the very column file. You can still declare it though, if you want to override it (eg. declare as duration type a text Evaluator column).

v1.2.1 :

  • Now is possible to define custom names to refer an specific column when in explicit mode, using custom_columns_names in Script configuration.
  • Added a new flag: Use column even if it's not visible; allows to filter based on a column previously declared in custom_columns_names or in user_defined_implicit_column, even if it is not visible in the current file display.
  • Added labels_access in Script configuration, which allows to choose if the filtering by labels should include all or only those visible in the Label Column. (Please note that use_filters_for_builtin set to true, override this option).
  • Minor corrections.

v1.1.0 :

  • Textual Filters mode renewed, now it has no technical limitations and can be used to filter any relevant column.
    • Rename Presets mode is kept for the time being, for legacy and comparative reasons, it can be changed by using the preferred_filter_mode option in Settings.
    • This brings a substantial time improvement when filtering Script, Evaluator and Shell columns.
  • Option to filter built-in columns in Textual Filters Mode.
    However, please note still has some very small limitations:
    • Can't get results inside expanded folders.
    • Ignore non qualified items flag is not applicable.
      To enable it, set the use_filters_for_builtin option in Settings to true.

v1.0.6 (2024-01-23)

  • Added support for 'Permissions' and 'Availability' columns.
  • Minor changes in script configuration dialog.
  • Fixed filter by group not working in some scenarios.
  • Minor corrections.

v1.0.5 (2024-01-10)

  • Added support for 'accessedtime', 'createdtime', 'modifiedtime', 'encodedby', 'mp3drm', 'aspectratiogroup', 'picphyssize', 'initialkey' and 'target' columns.
  • Added user_defined_implicit_column in Script Configuration, to init implicit mode on a specific column.

v1.0.4 (2024-01-08)

  • Added filter by filetype group option when referring to "Name" column.
  • Added 'desc' column support.
  • Fixed 'userdesc' column not working properly.

v1.0.3 (2023-12-27)

  • [day]d; [month]m; yyyy; MM/yyyy and duration column types now support ranges (when used with = or !=).
  • Filters completely redesigned, now supports most cases and hopefully should return the same results as using Rename Presets.
  • Fixed a possible error if trying to use an incomplete|incorrect regular expression.
  • Added support for Zip type folders (when opening a zip file as a folder).
  • Various bugs fixed.

v1.0.2 (2023-12-26)

  • Added basic support for command input history (appears as a list of suggestions when typing in the FAYT field).
  • Corrected diacritics filtering not working in some scenarios.
  • New modes when filtering by date:
    • [day]d Filter only by day value shown, regardless of the other values (only built-in and via Rename).
    • [month]m Filter only by month value shown, regardless of the other values (only built-in and via Rename).
    • [x]ha|da|ma|ya Filter for [x] hours|days|months|years ago from now.
    • Times can now be taken into account when comparing, if the input contains them.
    • HH:mm or HH:mm:ss Filter only using the time value (only built-in and via Rename).
  • Added support for "TB" and "PB" for sizes.
  • Added support for ranges in columns of type 'number' and 'size'.
    • In conjunction with = or != operators, you can now use notation for ranges using ... or - between both limits (inclusive).
      e.g. 2mb..3.5mb, 4-7

v1.0.1 (2023-12-21)

  • Fixed an issue when filtering for values in Label Column.

v1.0.0 (2023-12-19) : Initial release

11 Likes

MEGA great! thank UUU!

v1.0.1 fixed an issue when searching for values in Label column.

2 Likes

Hello. can i find a needed month (or time) with the script?
when i type $/06/ i get an error:

22/12/23 6:32 Search by Column:  ERROR   => Search input can't be converted to date
 22/12/23 6:32 Search by Column:  ERROR   => Input is not valid

for time filter 16: do nothing without error

I'm sorry but both the script and I fails to understand this.
What are you trying to search for?
For date type columns, you can search by a month for the current year, just using 06. For a particular month and year, you can use 06-yyyy.
Keep it in mind that 'date' is not treated like text, so regular expressions,case match,etc don't apply.

sorry, i just use slash for dates, thus i have 12/06/23 and I'm trying to find the sixth month of every year
and 06 doesn't work, only 6 works...

Yes, my bad. I'll correct that for the next version.

Also, I'll consider add support for searching for a specific day/month value. Thanks for the idea.

For BuildListFromPreset, creating a preset file is not necessary. The rename script can be embedded by putting it after the Rename command. For example, here is a command GetColumnValue I made to retrieve the column value:

// @set can't set an empty variable
@set glob:result
// SCRIPTARG doesn't work
Rename PATTERN * TO "&COLUMN&"
@script:jscript
function OnGetNewName(getNewNameData)
{
    if (!DOpus.vars.Exists("result"))
        DOpus.vars.Set("result", getNewNameData.newname);
    else
        DOpus.vars.Set("result", DOpus.vars.Get("result") + '\n' + getNewNameData.newname);
    return true;  // prevent rename
}
// Access the result by `{$glob:result}`
// Delete the result by `@set glob:result`
1 Like

@Chaoses-Ib you need to use Evaluator to get the actual value and not something escaped to be path friendly. Using that in TO directly may not work in some scenarios. That's why a rename preset is needed.

v1.0.2 brings several improvements and new syntax. Check the whole changes in main post.

2 Likes

Thanks a lot. it would be nice for "between search" by month and dates. ex, 10-11m

v1.0.3 is up for testing! Probably the last one, we'll see.
Contains several additions and corrections, which can be read in the main post.

2 Likes

v1.0.4 comes with a very handy option for search by Name using file type groups. Also fix searchs in some columns not working and brings support for 'desc' column.

2 Likes

v1.0.5 comes with a very welcomed additions, such extend support for more columns, and the ability to define a column name in implicit mode. Read the main post to find out about the details.
Also, due to the new changes, you will probably need to reconfigure certain script options. Sorry about that. (you can use Prefs SCRIPTS=ColSearch.js* for quick access).

1 Like

v1.0.6 is up with support for 'Permissions' and 'Availability' columns. With that, all columns with meaningful values for filtering are supported now.

2 Likes

Since in the last few weeks I've discovered the use of Evaluator clauses in textual filters, this has opened the opportunity to expand the capabilities of this script when using it in that mode. Now it no longer has the previous limitations and in theory it could filter any relevant column, applying the search flags as well.
The v1.1.0b brings the following major improvements:

  • Textual Filters mode renewed, now it has no technical limitations and can be used to filter any relevant column.

    • Rename Presets mode is kept for the time being, for legacy and comparative reasons, it can be changed by using the preferred_filter_mode option in Settings.
    • This brings a substantial time improvement when filtering Script, Evaluator and Shell columns.
  • Option to filter built-in columns in Textual Filters Mode.
    However, please note still has some very small limitations:

    • Can't get results inside expanded folders.
    • Ignore non qualified items flag is not applicable.
      To enable it, set the use_filters_for_builtin option in Settings to true.

If you wish to test the new beta version, you can download it from the main post. Your feedback is highly appreciated!

3 Likes

Nice script @errante. I gave v1.1.0b a try with an evaluator column and it works perfectly after following your installation and configuration instructions. :grinning: :+1:

I understand that instead of specifying a column number, I could define my eval column as the user_defined_implicit_column to add a level of convenience. What would be even more convenient would be the ability to specify a column label using a suitable prefix to identify that a label follows. e.g.

$LMyColLabel!="" as an alternative to $C5!=""

Without digging deeply into your code I have no idea how hard it would be to implement what is only a "nice to have" suggestion.

Thanks! Glad you found it useful.
Note that some instructions are not longer required in the beta. e.g. (and I forgot to mention) for Evaluator columns, is not longer mandatory to define their type in custom_columns_categories.
The script will parse your configuration to see what type that column is declared. graph and percentage type are going to be disabled.
Only define the type if you want to override it. e.g. useful if you have a Evaluator column with a duration notation, but defined as text.

In my todo list. Thanks for the feedback!

Update v1.2.0 Beta (2024-2-2) :

  • Added the possibility to define custom names for columns in explicit mode.

For using this option, use the new entry in config named custom_columns_names.
Define custom names to refer for an specific column, using the following syntax:
"mycolname":"<col name>"
Where <col name> is the actual column raw name. (Press this command's quick key twice to show a list of currently visible column's names).
Don't use any operator (<,=,> or !) for mycolname value. You also probably shouldn't use long names with spaces in it.
You can refer any column you like. A visual example:
image

You were right @aussieboykie, this make it more useful!

PD: @Leo can you please change this post to Scripts category? Thanks.

Update v1.2.0 Beta 2 :

  • Added a new flag: Filter even if not visible; allows to filter based on a column previously declared in custom_columns_names, even if it is not visible in the current file display.
  • Added labels_access configuration option, which allows to choose if the filtering by labels should include all (including status) or only those visible in the Label Column. (Please note that use_filters_for_builtin set to true, override this option).
2 Likes