Search for temp files

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Michi
Posts: 69
Joined: Thu Jul 28, 2022 9:23 am

Search for temp files

Post by Michi »

Hi!

I'm trying to search for temporary files in the index. Temporary files are defined, to my needs, by files that end with .tmp or .temp or all of those files that can be found in folders ending with ./temp or ./tmp.

Additionally, I want to switch the filter to "Everything", so I tried this search so far to no avail:

Code: Select all

filter:everything ext:temp;tmp
While the search for above extensions works perfectly well (removing the filer command), it does not when adding

Code: Select all

filter:everything
.
I've added the macro name "everything" to the existing default filter "Everything" beforehand, of course ;)

Moreover, how can I modify the search to include all files of folders ./tmp or ./temp, regardless of their extensions?

Btw, is there a kind of alias available, similar to macros, that resolves an alias name, e.g. "TMP" to the temp actual folder location: c:/users/<xxx>AppData/Local/Temp?

With other words: Any function that retrieves special paths, like temp or Desktop from Windows and returns the current location of those folders?
Tried:

Code: Select all

[shell:temp]
or

Code: Select all

[shell:tmp]
, does not return anything, maybe worth adding this preprocessor var?

Michael
Michi
Posts: 69
Joined: Thu Jul 28, 2022 9:23 am

Re: Search for temp files

Post by Michi »

So I did made some progress:

Code: Select all

!FileHistory\ regex:path:(temp|tmp)\\ | ext:tmp;temp
finds all folders and subfolders that end with temp or tmp and their files inside, which is expected and desired, or all files that have the extensions tmp or temp, no matter of their path.

Show stopper still is that when the filter Documents is active, the above search won't find all "temporary" files and folders. When filter Everything is active, the result is OK.

Is there a search command that removes all current filters? As explained above, adding a macro to standard filter Everything does not work in this case.

Edit: Now tried for testing purposed solely:

Code: Select all

filter:video
but this does not select the filter Video at all.
I've used this command in search bar without any further commands to no avail. When manually clicking on filter Video I get some files though.

Using ET 1357a btw.
void
Developer
Posts: 16740
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search for temp files

Post by void »

Please try the following search:

!FileHistory\ temp\ | tmp\ | ext:tmp;temp


Show stopper still is that when the filter Documents is active, the above search won't find all "temporary" files and folders. When filter Everything is active, the result is OK.
What results are you expecting to see when the Document filter is active?

To Everything this is treated as:

<a document file> AND <a temp file>

You'll see no results as both of these cannot be true.


Is there a search commend that removes all current filters?
No, the active filter cannot be disabled or changed from a search.

Technically, you can change your active filter with the /filter search command.

For example, type in the following search and press ENTER:

/filter video


Btw, is there a kind of alias available, similar to macros, that resolves an alias name, e.g. "TMP" to the temp actual folder location: c:/users/<xxx>AppData/Local/Temp?
%temp%


filter:video
filter:video is replaced with the search from your filter.
It is the same as using the filter macro: video:
Michi
Posts: 69
Joined: Thu Jul 28, 2022 9:23 am

Re: Search for temp files

Post by Michi »

Thanks for your prompt reply!

When using

Code: Select all

/filter Video
ET visually selects the filter "Video" in this case and the result is empty!

This, too, happens with

Code: Select all

/filter Everything
no results at all.

However, when manually selecting the filter Everything from the filter list, I get expected results. What is the difference? Maybe I misunderstood this command and its usage...

Btw, the link /filter leads to /<ini-setting-name>=<value> and I could not find any explanation of command /filter on this page neither.
void
Developer
Posts: 16740
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search for temp files

Post by void »

You'll need to press ENTER from the search box to execute a search command.

/filter video and /filter everything will not match any results.

/filter will not be useful for your case.

Please manually select the Everything filter.


the link /filter leads to /<ini-setting-name>=<value> and I could not find any explanation of command /filter on this page neither.
filter is an ini setting.

The correct syntax is:

/filter=<filter name>

A space also works:

/filter <filter name>

Everything will automatically update the active filter when you change this ini setting.
Michi
Posts: 69
Joined: Thu Jul 28, 2022 9:23 am

Re: Search for temp files

Post by Michi »

Thanks again!

Let's sum up a little bit:

Code: Select all

!FileHistory\ temp\ | tmp\ | ext:tmp;temp
works, if I've pre-selected the filter Everything: I see all expected files.

If I pre-select the filter Documents, I get only those files that are inside any of those paths, e.g. c:\temp.

That leads to my final question:
Which additional step is necessary to use the above command in a bookmark and have the filter Everything applied?
void
Developer
Posts: 16740
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search for temp files

Post by void »

To add a bookmark that sets your filter to Everything and search to: !FileHistory\ temp\ | tmp\ | ext:tmp;temp
  • In Everything, from the Bookmarks menu, click Add to Bookmarks....
  • Change the Name to: Temp
  • Change the Search to: !FileHistory\ temp\ | tmp\ | ext:tmp;temp
  • Change the Filter to: Everything
  • Click OK.
Michi
Posts: 69
Joined: Thu Jul 28, 2022 9:23 am

Re: Search for temp files

Post by Michi »

Oh! Silly me!

Did not see the obvious! I tried to define my search commands in the search bar and fiddle around with the filters :?
And a simple look into bookmarks editor would have revealed the simplest solution ever.

Thanks void!
Post Reply