Shorting code?

Discussion related to "Everything" 1.5.
Post Reply
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Shorting code?

Post by Biff »

Can I use this code:
I:\\Downloads\\**.{html,htm,mhtml}

instead of this one

I:\Downloads\**.html;I:\Downloads\**.htm;I:\Downloads\**.mhtml

here:

Image

Would exchaning the codes cause a new indexing?
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Shorting code?

Post by NotNull »

Biff wrote: Tue Jan 21, 2025 1:07 pm Would exchaning the codes cause a new indexing?
Just the added files will be indexed.
Biff wrote: Tue Jan 21, 2025 1:07 pm Can I use this code:
I:\\Downloads\\**.{html,htm,mhtml}
That is not supported.
Regular expressions should work though:
regex:^I:\\Downloads\\.*\.(html|htm|mhtml)$


^ = start of text
I:\\Downloads\\ = starting path
.* = include as much characters as possible, until ..

\. = literal dot (".")
(html|htm|mhtml) = htm OR htm OR mhtml
$ = end of text
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Shorting code?

Post by Biff »

Thank you very much!
Just the added files will be indexed.
Sorry, what I meant was:

This is added to the field "Include only files" now:

I:\Downloads\**.html;I:\Downloads\**.htm;I:\Downloads\**.mhtml

When I remove that line above and replace it with:

regex:^I:\\Downloads\\.*\.(html|htm|mhtml)$

Then nothing will be indexed when I click the "Apply" button (if there are no new files)?

In the screenshot above (or in the code below) "regex:^" already is added at the beginning of the line / code. So I do have to add it a second / further time? So it would be:
regex:^I:\\Downloads\\.*\.(html|htm|mhtml)$

That
I:\\Downloads\\.*\.(html|htm|mhtml)
would not be enough?

This is the entire code in the field "Include only files":

Code: Select all

*.doc;*.docx;*.pdf;*.txt;*.xls;*.xlsx;*.ods;*.odt;*.ott;*.scrivx;*.csv;*.ics;*.rtf;*.eml;*.srt;regex:^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;I:\Eigene Dateien\Not - An txt-Dateien\**.html;I:\Eigene Dateien\Not - An txt-Dateien\**.htm;I:\Eigene Dateien\Not - An txt-Dateien\**.mhtml;I:\Downloads\**.html;I:\Downloads\**.htm;I:\Downloads\**.mhtml;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.html;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.htm;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.mhtml;I:\Eigene Dateien\MaCoKo)\**.html;I:\Eigene Dateien\MaCoKo)\**.htm;I:\Eigene Dateien\MaCoKo)\**.mhtml;I:\Eigene Dateien\Rez\**.html;I:\Eigene Dateien\Rez\**.htm;I:\Eigene Dateien\Rez\**.mhtml
I want to make it clearer, so I want to shorten it (if possible).
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Shorting code?

Post by NotNull »

Do the following 2 folders really have a single ")" at the end?

Code: Select all

I:\Eigene Dateien\MaCoKo)\
I:\Eigene Dateien\Re - Fre\BaDiKo)\
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Shorting code?

Post by Biff »

Ah yes, they have indeed, so they are really named like that at the moment. But it is a mistake I made, I will correct it later.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Shorting code?

Post by NotNull »

Thank you for explaining!
BTW: This will trigger a re-indexing of the content of those 2 folders. Can't tell if drive I: is local or offline or ..

While figuring out how to shorten your code -- I think I got it, but needs more checking to prevent unneccesary re-indexing -- saw this one:
regex:^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;

This will content-index files *without extension* that are in folder "I:\Eigene Dateien\Not - An txt-Dateien\"
Is that how it should be?


And another question/remark:
Why not content-index *all* htm/html/mhtml in I:\Eigene Dateien\?
The amount of extra files that will be indexed can be found with the following search query:

Code: Select all

ext:html;htm;mhtml   "I:\\Eigene Dateien\"   !"I:\Eigene Dateien\Not - An txt-Dateien\"   !"I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\"   !"I:\Eigene Dateien\MaCoKo)\"   !":\Eigene Dateien\Rez\"
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Shorting code?

Post by Biff »

BTW: This will trigger a re-indexing of the content of those 2 folders. Can't tell if drive I: is local or offline or ..
Yes, that's not that much files to be re-indexed (if only these 2 folders are indexed) in that folders of the alyways online drive, thank you.
regex:^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;

This will content-index files *without extension* that are in folder "I:\Eigene Dateien\Not - An txt-Dateien\"
Is that how it should be?
Yes, it is, there are txt files without extension (because naming is a bit easier / faster) in that folder. It's code Void gave me.
While figuring out how to shorten your code -- I
Many thanks!
And another question/remark:
Why not content-index *all* htm/html/mhtml in I:\Eigene Dateien\?
Yes, that is a very good idea. Actually I very much would like Everything let index everything (would be much more easier to handle,I would much prefer it and I would not need that code I have any idea from). But everything already now often needs so / too much RAM, up to 7 or 8 GB (on my cheap junk Lenovo with 14 GB RAM), I think, causing the Notebook to slow down, freeze, crashes programs (because the RAM management or whatever does not work properly on this junk Notebook), I guess), that the RAM doesn't allow it.
The amount of extra files that will be indexed can be found with the following search query:
ode: Select all

ext:html;htm;mhtml "I:\\Eigene Dateien\" !"I:\Eigene Dateien\Not
Thank you for the code, there are 9227 files shown. So, I estimate, it would be at least about 9100 files more to be indexed. I do not have any idea, but I assume, that could finish off the waste Lenovo. Or how many RAM might that take? I could try that, but I do not want to crash the system here.

Is there a way to insert line breaks or something else so that the code got clearer (I copy that code to a txt file to edit it, the code then is a single very unclear line)?
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Shorting code?

Post by tuska »

Biff wrote: Thu Jan 23, 2025 9:56 pm Is there a way to insert line breaks or something else so that the code got clearer (I copy that code to a txt file to edit it,
the code then is a single very unclear line)?
Texteditor "Notepad++": Menu "View" > "Word wrap" (ON/OFF).
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Shorting code?

Post by Biff »

Ah, sorry for my bad expression and many thanks for the link. Yes, I have Word Wrap on.

I meant: Is there a way to insert line breaks or something else in that field in Everything between, for example, groups of folder / paths to always keep themso that the code got clearer (I copy that code to a txt file to edit it, the code then is a single very unclear line)?

Instead of:
*.doc;*.docx;*.pdf;*.txt;*.xls;*.xlsx;*.ods;*.odt;*.ott;*.scrivx;*.csv;*.ics;*.rtf;*.eml;*.srt;regex:^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;I:\Eigene Dateien\Not - An txt-Dateien\**.html;I:\Eigene Dateien\Not - An txt-Dateien\**.htm;I:\Eigene Dateien\Not - An txt-Dateien\**.mhtml;I:\Downloads\**.html;I:\Downloads\**.htm;I:\Downloads\**.mhtml;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.html;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.htm;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.mhtml;I:\Eigene Dateien\MaCoKo)\**.html;I:\Eigene Dateien\MaCoKo)\**.htm;I:\Eigene Dateien\MaCoKo)\**.mhtml;I:\Eigene Dateien\Rez\**.html;I:\Eigene Dateien\Rez\**.htm;I:\Eigene Dateien\Rez\**.mhtml

For example so:
*.doc;*.docx;*.pdf;*.txt;*.xls;*.xlsx;*.ods;*.odt;*.ott;*.scrivx;*.csv;*.ics;*.rtf;*.eml;*.srt;regex:

^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;I:\Eigene Dateien\Not - An txt-Dateien\**.html;I:\Eigene Dateien\Not - An txt-Dateien\**.htm;I:\Eigene Dateien\Not - An txt-Dateien\**.mhtml;

I:\Downloads\**.html;I:\Downloads\**.htm;I:\Downloads\**.mhtml;

I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.html;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.htm;I:\Eigene Dateien\Re - Fre\BaDiKo)\comd\KoVer\**.mhtml;

I:\Eigene Dateien\MaCoKo)\**.html;I:\Eigene Dateien\MaCoKo)\**.htm;I:\Eigene Dateien\MaCoKo)\**.mhtml;I:\Eigene Dateien\Rez\**.html;I:\Eigene Dateien\Rez\**.htm;I:\Eigene Dateien\Rez\**.mhtml
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Shorting code?

Post by NotNull »

After removing the ) from the foldernames, try this shorter code:

Code: Select all

*.doc;*.docx;*.pdf;*.txt;*.xls;*.xlsx;*.ods;*.odt;*.ott;*.scrivx;*.csv;*.ics;*.rtf;*.eml;*.srt;regex:^I:\\Downloads\\.*\.(html|htm|mhtml)$;regex:^I:\\Eigene Dateien\\(Not - An txt-Dateien\\|Re - Fre\\BaDiKo\\comd\\KoVer\\|MaCoKo\\|Rez\\).*\.(html|htm|mhtml)$;regex:^I:\\Eigene Dateien\\Not - An txt-Dateien\\[^.]*$;

I'm a bit "worried" about the foldernames that include a "-" as typically a "-" in regular expressions is written as "\-".
But as the code written by void already works, this should be no problem after all.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Shorting code?

Post by NotNull »

Biff wrote: Thu Jan 23, 2025 9:56 pm
Thank you for the code, there are 9227 files shown. So, I estimate, it would be at least about 9100 files more to be indexed. I do not have any idea, but I assume, that could finish off the waste Lenovo. Or how many RAM might that take?
If you entered that search query in Everything, the size of all the html (etc) files combined will be shown in the statusbar.
As these are plain text files, that will be the amount of MB your RAM usage will grow if included in the index.

Anyway: Better not index the extra files then.
Nothing wrong with 14GB installed RAM though, I have a couple of Windows systems with less than that (one with 4GB even) and they all function without issues.

Is there a way to insert line breaks or something else so that the code got clearer (I copy that code to a txt file to edit it, the code then is a single very unclear line)?
Unfortunately not.
I wish the content indexing interface would resemble the one used for properties.
Biff
Posts: 1243
Joined: Mon May 25, 2015 7:09 am

Re: Shorting code?

Post by Biff »

After removing the ) from the foldernames, try this shorter code:
Yes, that seems to work, without indexing, just a little, for one minute or so, thank you very much!
But as the code written by void already works, this should be no problem after all.
Yes, indeed, not working code is not possible.
If you entered that search query in Everything, the size of all the html (etc) files combined will be shown in the statusbar.
As these are plain text files, that will be the amount of MB your RAM usage will grow if included in the index.
Oops, ah, so it is easy like that? Together the HTML, MHTL, HTM files are more than 12,6 GB big. So that was the amount of GB more getting into the RAM (and crashing may system)? These files really are plain text files? So an indexd 100 MB html file would really need 100 MB of RAM?
Nothing wrong with 14GB installed RAM though, I have a couple of Windows systems with less than that (one with 4GB even) and they all function without issues.
Yes, if Win functions without issues at all (never heard of that). But Everything needed at least 8 GB of RAM here (now it is just at 4 GB), I guess, actually much more (so I would let Everything index the content of (almost) everything.
Anyway: Better not index the extra files then.
Yes, but I wished I could.
I wish the content indexing interface would resemble the one used for properties.
Yes, that would be great!

Many thanks again!
Post Reply