Does find text support or search using ';'

English support forum

Moderators: white, Hacker, petermad, Stefan2

Deonri
Junior Member
Junior Member
Posts: 6
Joined: 2021-04-27, 11:24 UTC

Does find text support or search using ';'

Post by *Deonri »

I'm trying to use an "or" search inside a file, I used the "find text" option, separated with a semicolon (the same way it's been done when "Search for" (file names))

Apparently TC tries to search the semicolon it self inside the file

Any other way for 'or' search inside a file ?
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Does find text support or search using ';'

Post by *Stefan2 »

Hi and welcome 2Deonri

You can use RegEx-search there.
Please press F1 key while in the find dialog to read more.




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

Re: Does find text support or search using ';'

Post by *tuska »

Hi,
Search query in Total Commander using tool 'Everything 1.5'.

Windows 10 Pro (x64) Version 20H2 (OS build 19042.928)
TC 10.00b7 x64/x86 | 'Everything' 1.5.0.1256a (x64)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Does find text support or search using ';'

Post by *Dalai »

The "Find Text" option finds text literal unless either RegEx2 or Office-xml or Hex is used. The semicolon works only in the "Search in" field (and maybe in the "Search for" field, not sure, never used it because simple spaces are enough to separate search terms).

To be able to run a search for file contents with an "or" operator, you either need Everyting as tuska pointed out, or some content plugin that is able to search file contents, which can then be used in the "Plugins" tab of TC's search.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

Dalai wrote: 2021-04-27, 12:51 UTC To be able to run a search for file contents with an "or" operator ... -> content plugin that is able to search file contents ...
TextSearch 1.6.4

Code: Select all

[✓] Search in plugins		◉ OR (any match)
 
Plugin:		Property:	OP:		Value:
------------------------------------------------------
textsearch	Text		contains	zzz
textsearch	Text		contains	xxx
Press Button "Start search"...
Deonri
Junior Member
Junior Member
Posts: 6
Joined: 2021-04-27, 11:24 UTC

Re: Does find text support or search using ';'

Post by *Deonri »

Thanks @Tuska
Is it possible to search unicode/UTF-8 using the plugins mentioned above ?
Or maybe a search in Hex would be better ?
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

Deonri wrote: 2021-04-27, 14:07 UTC Thanks @Tuska
Is it possible to search unicode/UTF-8 using the plugins mentioned above ?
Or maybe a search in Hex would be better ?
In the "Find Files"-window there are options for "Unicode UTF16" and "UTF8" to tick.
In my opinion, this should work in combination with the plug-in query.

Furthermore, you can also select the item "Hex" below "Find text:".
Maybe a click on the "Help" button in this window will also help?

I therefore suggest that you simply try this out.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Does find text support or search using ';'

Post by *Dalai »

2tuska
The options "Unicode UTF-16", "ANSI" and "UTF-8" are a subset of "Find text" function. They don't influence/control how plugins search (for text) in any way. When using the "Find text" function and plugins simultaneously they work as an AND operator, meaning that TC will only list files that contain the specified text and match the plugin search options.

I guess that it depends on the file type since TextSearch plugin's readme.html has some information about codepage conversion and {CP:Codepage} macro.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

2Dalai
Apart from hints in the file "Readme.html" for the file "TextSearch.ini", which I have not (yet) implemented,
I have successfully carried out the following example after your contribution:

Example file: Test.txt ... UTF-16LE with Signature (EmEditor), UCS-2 LE BOM (Notepad++)
  1. Search in separate process... Alt+Shift+F7
  2. [Option: Delete the content of field "Search in:"]
  3. [✓] Find text:
    [✓] Unicode UTF16
    [✓] UTF8
    [✓] Plugins: ... Click on Button ± "Plus/Minus"
  4. Add...
  5. Enter a name for this search: TextSearch_Unicode-UTF16_UTF8 -> click on Button"OK"
  6. Specify file type, e.g. *.txt, or RegEx with leading '<', like <(a|b): *.txt -> click on Button"OK"
  7. Please enter custom fields: -> Click on Button + "Plus", choose Plugin: textsearch -> click on Button"OK" ...
    [=textsearch.Text] -> click on Button"OK"
  8. Text search in plugins: [✓] TextSearch_Unicode-UTF16_UTF8:*.txt was added -> click on Button"OK"
  9. "Find Files"-window -> [✓] Plugins: TextSearch_Unicode-UTF16_UTF8 was added
  10. [✓] Find text: Searchword -> press button "Start search" -> Searchword is found in Test.txt UTF-16LE with Signature!
  11. [ ] Unicode UTF16 -> [✓] Find text: Searchword -> press button "Start search" -> Searchword is NOT found in Test.txt!
TextSearch.ini

Code: Select all

[Converters]
;http://ghisler.ch/board/viewtopic.php?t=38403
;RTF
RTF={CP:RTF}

;OdfToTxt
ODT=Conv\OdfToTxt\OdfToTxt.exe "{In}" "/Out={Out}" /ANSI /NoHead
ODS=ODT
ODP=ODT
ODG=ODT
ODF=ODT
ODB=ODT
ODM=ODT
OTT=ODT
OTH=ODT
OTS=ODT
OTG=ODT
OTP=ODT
SXW=ODT
SXC=ODT
SXG=ODT
SXI=ODT
SXD=ODT
SXM=ODT
STW=ODT
STC=ODT
STD=ODT
STI=ODT

;XDoc2Txt
XDOC=%COMSPEC% /C Conv\XDoc2txt\xdoc2txt.exe "{In}" > "{Out}" 
sxw=XDOC 
sxc=XDOC 
sxi=XDOC 
sxd=XDOC 
odt=XDOC 
ods=XDOC 
odp=XDOC 
odg=XDOC 
docx=XDOC 
docm=XDOC 
xlsx=XDOC 
xlsm=XDOC 
pptx=XDOC 
pptm=XDOC 
doc=XDOC 
xls=XDOC 
ppt=XDOC 
rtf=XDOC 
jaw=XDOC 
jtw=XDOC 
jbw=XDOC 
juw=XDOC 
jfw=XDOC 
jvw=XDOC 
jtd=XDOC 
jtt=XDOC 
oas=XDOC 
oa2=XDOC 
oa3=XDOC 
bun=XDOC 
wj2=XDOC 
wj3=XDOC 
wk3=XDOC 
wk4=XDOC 
123=XDOC 
wri=XDOC 
pdf=XDOC 
mht=XDOC 
html=XDOC 
eml=XDOC

;TXT 
TXT=%COMSPEC% /C copy "{In}" "{Out}" 
HTM=TXT 
HTLM=TXT 
CSV=TXT 
XML=TXT 
PHP=TXT 
BAT=TXT 
CMD=TXT 
SONSTASCII=TXT 

;INI 
INI=%COMSPEC% /C type "{In}" > "{Out}"

;MSG 
MSG=%COMSPEC% /C copy "{In}" "{Out}" 

;GetTextIFilter - commented by default
;
;IFILTER=Conv\IFilter\GetTextIFilter.exe -s "{In}" -d "{Out}" -l
;RTF=IFILTER
;DOC=IFILTER
;DOT=IFILTER
;PPT=IFILTER
;XLS=IFILTER
;HTM=IFILTER
;HTML=IFILTER
For me, this seems to work.

For an OR query, I think the following is recommended:

Code: Select all

[✓] Find text: (zzz|123)	-> find "zzz" OR "123"
[✓] RegEx (2)
Regards,
Karl
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

tuska wrote: 2021-04-27, 21:35 UTC 2Dalai
Apart from hints in the file "Readme.html" for the file "TextSearch.ini", which I have not (yet) implemented,...
Out of interest, I have now added the following to the "TextSearch.ini" file under section [Converters]:

Code: Select all

TXT={CP:ANSI} {CP:UTF8} {CP:UTF16}
TextSearch.ini - (only section 'Converters')

Code: Select all

[Converters]
;http://ghisler.ch/board/viewtopic.php?t=38403
;RTF
RTF={CP:RTF}
;https://ghisler.ch/board/viewtopic.php?f=3&t=74488
TXT={CP:ANSI} {CP:UTF8} {CP:UTF16}
With this entry it is possible to make "OR" queries exclusively via the "Plugins" tab in the "Find Files" window for *.TXT files.

The query in the field "Find text:" on the tab "General" in the "Find Files" window is thus no longer necessary,
but can be helpful in narrowing down a search query (UTF8 | UTF16).

2Deonri
There should be a solution for you now. :wink:

Final notes:
  1. Plugin installation: A double click on the file "wdx_textsearch.zip" in Total Commander(!) starts the plugin installation.
  2. 'Everything':
    1. File content queries are possible directly in 'Everything 1.5' in real-time.
    2. File content queries in Total Commander with integration of 'Everything 1.5' are almost in real time,
      because Total Commander still needs some time to prepare the search results.
 
Regards,
Karl
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Does find text support or search using ';'

Post by *Dalai »

2tuska
You're right, that probably works. JFTR, I was refering to the "Plugins" tab only. Since I'm still using TC 8.x (because I find the icons of junctions in newer releases ugly and too small, but that's not the point and OT) there is no "Plugins" option under the "Find text" feature in that version.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

2Dalai
Thanks for the info.

[OT] I actually find the Junctions icons good -> Picture [/OT]
Deonri
Junior Member
Junior Member
Posts: 6
Joined: 2021-04-27, 11:24 UTC

Re: Does find text support or search using ';'

Post by *Deonri »

2tuska

The textsearch plugin doen't work atall
I'm trying to search inside a very large file, and takes just a split second to say "no files found"

What am I doing wrong ?
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Does find text support or search using ';'

Post by *tuska »

Mmmh, hard to say.

TextSearch.ini -> did you adapt this as I specified or used my TextSearch.ini?
(The TextSearch.ini should be stored in the same directory as the TextSearch.Sample.ini.)

First try a small text file to see if you can find anything at all with the plugin
or try to reproduce the examples given above, which worked for me.

If this does not work, then install the plugin again by double-clicking on the .zip file in Total Commander -> simply install over it!

Describe exactly the steps you used to search - two search methods were given above.

Hardcopies would also be highly recommended -> upload a .png file to an image hoster, e.g.
https://imgbb.com/
https://imgur.com/
https://pasteboard.co/
and link this image here in the forum.
Deonri
Junior Member
Junior Member
Posts: 6
Joined: 2021-04-27, 11:24 UTC

Re: Does find text support or search using ';'

Post by *Deonri »

tuska wrote: 2021-04-28, 20:43 UTC TextSearch.ini -> did you adapt this as I specified
I didn't adapted anything
I have just installed the plugin and followed your example:

Code: Select all

[✓] Search in plugins		◉ OR (any match)
 
Plugin:		Property:	OP:		Value:
------------------------------------------------------
textsearch	Text		contains	zzz
textsearch	Text		contains	xxx
Post Reply