Search queries in TC using 'Everything'

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
tuska
Power Member
Power Member
Posts: 1792
Joined: 2007-05-21, 12:17 UTC

Search queries in TC using 'Everything'

Post by *tuska » 2020-01-03, 17:07 UTC

As of Total Commander 9.0, the tool 'Everything' can be integrated into a search query with its own search parameters.
In order to use these, the search parameters "ev:" or "ed:" in Total Commander must be prefixed.
The latter limits the search to the current search directory [directory depth adjustable].
1. TC Parameter --> ed:
Show
TC Parameter --> ed:

Code: Select all

Start search query:
- Search... ................... Alt+F7
- Search in separate process...	Alt+Shift+F7
- Search in separate process...	Ctrl+F (self-defined key combination) *)

Search for: 		    --> up from the current directory in the active TC window
ed:dm:today		    --> Search for folders and files that have been changed (dm:) today (today)
ed: *.msg dc:thisweek	    --> Search for emails (.msg) created (dc:) this week (thisweek)

- Search in TC with [Parameter(s) of] 'Everything' up from the current directory - adjustable directory depth!
  [even if the field "Search in:" is empty *)].

- *) 'Field' Search in: 'empty': 
  This is the case, for example, if you have redefined and used a shortcut key yourself - see:
  https://www.ghisler.ch/phpBB3/viewtopic.php?f=2&t=47 (Settings)
  CTRL+F | Search in TC with integration of 'Everything' | Prefix ed: | Separate window
  
  Ctrl+F is currently assigned by default to "FTP Connect ..." (see: menu "Net").   
  Shift+F is also useful as a shortcut key because it has not been assigned a command by default.
  
- If 'Everything' is checked - without prefix ed: - then the search criteria of TC (with the support of 'Everything') apply,
  i.e. you still get the search result much faster than if 'Everything' is not checked.

- HISTORY.TXT 
  16.10.19 Release Total Commander 9.50 beta 1
  16.07.19 Added: Find files: Automatically check 'Everything' option when using prefix ev: or ed: in search field (32/64)
  
  30.11.16 Release Total Commander 9.0a release candidate 1 (32/64)
  29.11.16 Added: Search function: 
           Use prefix ed: instead of ev: for unfiltered Everything search in the location(s) given by "Search in" field. 
           Also supports the "limit depth" option (in the drop-down box: "Search in subdirectories") (32/64)
           
2. TC Parameter --> ev:
Show
TC Parameter --> ev:

Code: Select all

Start search query:
- Search... ................... Alt+F7
- Search in separate process...	Alt+Shift+F7
- Search in separate process...	Ctrl+F (self-defined key combination) *)

  *) This is the case, for example, if you have redefined and used a shortcut key yourself - see (-> only example!):
  https://www.ghisler.ch/phpBB3/viewtopic.php?f=2&t=47 (Settings)
  CTRL+F | Search in TC with integration of 'Everything' | Prefix ed: | Separate window
  
If ev: is entered in TC in the field "Search for:", then
- in TC the content of field "Search in:" (path, drives) is IGNORED!
- in TC the field "Search in subdirectories:" is IGNORED! **)
- this means that the search is performed in TC in all indexed drives/folders using 'Everything'.

However, the search is only carried out in those drives/folders that have been defined accordingly in the 'Everything' settings,
i.e. under menu "Tools" - "Options..."
- Indexes: NTFS (Local volumes) - ☑ Include in database,...                (Hard disks + USB drives: NTFS formatted)
- Indexes: Folders              - ☑ Attempt to monitor changes, ◉ Update  (e.g. network folders, USB drives[FAT32,...], etc.*))
- Indexes: NTFS  		  https://www.voidtools.com/support/everything/everything_service/
- Indexes: Folders                https://www.voidtools.com/support/everything/folder_indexing/

*) etc. means in this case: Drives that are not NTFS formatted.

Files and folders that have been indexed and created, for example, today are immediately found, e.g. on drive C:, D:, I:, etc.

Search for: 	            --> in all indexed drives and folders; field: "Search in:" (path, drives) IGNORED!
  ev:dm:today		    --> Search for folders and files that have been changed (dm:) today (today)
  ev:dm:last30minutes <folder:|file:> !C: --> Search for folders and files <folder:|file:>,
  				which changed (dm:) in the last 30 minutes (last30minutes),
  				with the exception of drive C: (!C:)
  **) The search can be narrowed down with the parameter ev:, e.g. as follows (for drive D: or D:,I:,J:):
  ev:D: !child:*.xyz child:*.bak 		) 
  ev:<D:|I:|J:> !child:*.xyz child:*.bak	) --> http://www.voidtools.com/support/everything/searching/

- If 'Everything' is checked - without the prefix ev: - then the search criteria of TC (with the support of 'Everything') apply,
  i.e. you still get the search result much faster than if 'Everything' is not checked.

- HISTORY.TXT 
  16.10.19 Release Total Commander 9.50 beta 1
  16.07.19 Added: Find files: Automatically check 'Everything' option when using prefix ev: or ed: in search field (32/64)
  
  13.07.16 Release Total Commander 9.0 beta 5 (32/64)
  13.07.16 Added: Experimental, not yet documented in help: Pass search parameters directly to "Everything" with prefix ev:,
  e.g. ev:<c:|d:> *.mp3 Note: All other search parameters except for the path field will still be applied to the results (32/64)  
  
3. RegEx - Regular Expressions
Show
RegEx - Regular Expressions

Code: Select all

RegEx
- If you use ev: or ed: in TC in the field "Search for:", then the search criteria/parameters of 'Everything' apply,
  i.e. the 'Everything' parameter regex: MUST be specified (!).
  Examples:
  ev:regex:((.+?)?(?=\.vbs))(.vbs)$             https://ghisler.ch/board/viewtopic.php?p=362188#p362188 (English)
  ed:files:regex:^(?!\d\d\d\d\-\d\d-\d\d_).+    https://ghisler.ch/board/viewtopic.php?p=363774#p363774 (German)
  If the prefix ed: is used, the directory depth can also be set in TC, for example.
  
- If ☑ RegEx and ☑ 'Everything' is checked (NO ev: and ed:),   
  then the search criteria of TC (with the support of 'Everything') apply.  
  
- F1 - Help: Total Commander uses the free Delphi library TRegExpr by Andrey V. Sorokin,   
  can be found at http://www.regexpstudio.com/.  See also: https://ghisler.ch/board/viewtopic.php?p=362271#p362271

- QuickSearch eXtended-Plugin by Samuel Plentz 
  - Main- and [download-]Link ..............:   https://ghisler.ch/board/viewtopic.php?t=22592
  - DEELX - Regular Expression Engine for C++   https://www.ghisler.ch/board/viewtopic.php?p=173376#p173376,
      https://www.codeproject.com/Articles/15917/DEELX-Regular-Expression-Engine-for-C
    - DEELX supports PERL compatible regular expression syntax.
    - Besides the basic pattern syntax, DEELX has implemented many extended syntaxes...
  - Example (German):
    Search query (-> RegEx) with the QuickSearch eXtended plugin
    https://ghisler.ch/board/viewtopic.php?p=363822#p363822
    
- [WDX] PCREsearch"-Plugin by milo1012 ... Perl Compatible Regular Expressions (PCRE)
  Link: https://www.ghisler.ch/board/viewtopic.php?t=38098
  or    https://www.ghisler.ch/board/viewtopic.php?f=6&t=38098  

- 'Everything' uses 'Perl Compatible Regular Expressions (PCRE)'
  'Everything' - Menu "Help" - "About Everything CTRL+F1" - "License"...
  See also: https://ghisler.ch/board/viewtopic.php?p=362273#p362273
  
- Difference between RegEx versions used in 
  TC (TRegExpr) <=> QuickSearch eXtended-Plugin (PCRE), "PCREsearch"-Plugin (PCRE) and 'Everything' (PCRE):
  TC (TRegExpr) ==> does NOT support "Lookaround-Assertions", e.g. "lookahead" and "lookbehind".
  
  https://ghisler.ch/board/viewtopic.php?p=363825#p363825
  https://stackoverflow.com/questions/2973436/regex-lookahead-lookbehind-and-atomic-groups
  https://www.regular-expressions.info/lookaround.html

- Important - see: https://ghisler.ch/board/viewtopic.php?p=364111#p364111: 
  Note that 'TRegExpr' as well as 'Everything's' implementation of 'Perl Compatible Regular Expressions (PCRE)' 
  are case insensitive.
  
4. F1 - Help and explanation --> ed: and ev:
Show
F1 - Help and explanation

Code: Select all

F1 - Help
-------------------------------------------------------------------------------------------
Put "ev:" in front of the search string to pass it to 'Everything' unchanged. 
You will then have to use the 'Everything' search syntax, see www.voidtools.com.

Put "ed:" in front of the search string: Like "ev:", but search only in the directories specified in the "Search in" field. 
Also handles "Search in subdirectories" option. 
This is handled by prefixing path:c:\path and optionally parents:<nr to the entered search string.

Explanation of Mr Ghisler / https://www.ghisler.ch/board/viewtopic.php?p=353536#p353536
-------------------------------------------------------------------------------------------
Incidentally, these are just internal TC parameters - they just tell TC
that he should pass the search string 1:1 without any changes to 'Everything' (with or without current directory).
Without this prefix, the TC search string is converted to the 'Everything' syntax and the returned result
again compared with the search parameters.

5. F2 Search in found files/folder
Show
F2 Search in found files/folder

Code: Select all

- HISTORY.TXT
  Options added during the development of 9.22 (but only added to 9.50):
  04.02.19 Added: Search dialog: Option to search in search results only (32/64)
  04.02.19 Added: Search dialog: View previous search results (32/64)
  -----------------------------------------------------------------------------------------
  These functions related to "F2 Find in found files/folders" are for normal users
  available since 16.10.19 Release Total Commander 9.50 beta 1.
  -----------------------------------------------------------------------------------------
  
- How it works - example
  1. Search for: ed:ext:docx;dotx;doc;dot;rtf;txt
  2. Press the "Start search" button
  3. 'F2 Search in found files/folders' ...
     3.1 Press F2       -> the content of the field "Search for:" is highlighted
     3.2 Set check mark -> the content of field "Search for:"     is NOT marked
  4. Overwrite the entire - marked - first search term with a second search term
  5. Press the "Start search" button -> if applicable, you will receive a new search result;
     'F2 Find in found files/folders' is still checked
  6. Click on the button '<' --> the previous (first) search result is displayed - the second search term is displayed *)
  7. Click on the button '>' --> the last (second) search result is displayed    - the second search term is displayed
  
- *) On this point I have put forward a proposal here: https://ghisler.ch/board/viewtopic.php?f=14&t=54477

- NOTE on the use of prefix ev: and ed: in connection with 'F2 Search in found files/folders'
  It is not possible in an existing (first) search result after using 'F2 Search in found files/folders'
  to use the prefix ev: or ed: in the field "Search for:".

  In such a case, these error messages appear:
  ---------------------------------------------------------------------------------------------------------------
  | 	Function not supported!				|	Function not supported!				|
  | 	ed:						|	ev:						|
  | 	+						|	+						|
  | 	F2 Search in found files/folders		|	F2 Search in found files/folders		|
  ---------------------------------------------------------------------------------------------------------------
  ... and afterwards in the field "Search results" and status line: " [No files found] - search aborted" ...

  If you now remove the prefix ed: or ed: in the field "Search for:" and press the button "Start search" again,
  then you search for the search term and you get search results if applicable ... but ...
  ATTENTION: This method is not 100% reliable -> I think it is always recommended to start a new search query(!)
  ---------------------------------------------------------------------------------------------------------------  
  The function 'F2 Search in found files/folders' can also be executed several times!
  
  IMPORTANT NOTE according to email from 16.12.2019 by Mr. Ghisler:
  If there are folders in the search result, then after 'F2 Search in found files/folders' 
  it will be searched in these folders (!), the folders themselves are no longer part of the search result!
  ---------------------------------------------------------------------------------------------------------------    
  The prefix ev: or ed: may only be used for the first search query.
  
  Reason: https://ghisler.ch/board/viewtopic.php?p=361326#p361326
  "Therefore it's not possible to tell Everything to search in a given set of previous search results."

  Example:
  1. Search for: ed:ext:docx ... OR ... ed:*.docx
  2. Press the "Start search" button
  3. 'F2 Search in found files/folders'
     3.1 Press F2       -> the content of the field "Search for:" is highlighted
     3.2 Set check mark -> the content of field "Search for:"     is NOT marked
  4. Overwrite the entire - marked - first search term with a second search term,  
     e.g. with ed:Macro --> the prefix ed: cannot be used here again, 
     an error message is displayed as shown above.
     
- Search rules - Special feature - IMPORTANT NOTES(!)
  1. Search e.g. for: ed:ext:txt -------------------------------> 1st search result: 'Everything' search rules are applied!
     Example: 						          ************************************************************
     Without any 'Everything' parameters hidden files will be found.
  
  2. 'F2 Search in found files/folders': Press F2
     When searching in results (by pressing F2) 'Everything' is not used! (Email from 24.12.2019 by Mr. Ghisler)
     30.12.19 Release Total Commander 9.50 beta 11
     24.12.19 Fixed: Find files, F2 search in found files/folders: 'Everything' option must be ignored, 
              it could lead to duplicate search results when nested directories were in the previous results (32/64)
  
  2a Search for: keyword (2nd search query, without ev: ed:) ---> 2nd search result: Total Commander search rules are applied!
     Example: 							  ************************************************************
     To find hidden files in TC,
     1. these must be shown first, e.g. with the command: cm_SwitchHidSys ... OR
     2. you have to search for hidden files: Tab "Advanced" -> Attributes: Hidden.
     
  This was, however, an example in which, during the first search, you could use 'Everything' to receives more search results. 
  In case of doubt it is recommended to perform an additional search query directly in 'Everything'.
  
  Reason: https://ghisler.ch/board/viewtopic.php?p=361326#p361326
  "Therefore it's not possible to tell Everything to search in a given set of previous search results."
  
6. Link collection (Ctrl+click on link ...)
Show
Important links
https://www.voidtools.com/downloads/                                                'Everything' Downloads
https://www.voidtools.com/forum/viewtopic.php?f=2&t=5718               'Everything' 1.4.1 Beta Nightly Builds
http://www.voidtools.com/support/everything/installing_everything/   'Everything' Installation
https://ghisler.ch/board/viewtopic.php?p=346372#p346372                    'Everything' Important information + settings (1 of 2)
https://ghisler.ch/board/viewtopic.php?f=3&t=51534                             'Everything' Important information + settings (2 of 2)
http://www.voidtools.com/support/everything/searching/                    'Everything' Parameters for the search
https://regex101.com/                                                                         Online RegEx Tester (Quick Reference, Explanation)
https://regexone.com/                                                                         RegexOne - Learn Regular Expressions
This summary is also available in German language.

Post Reply