I think the problem is caused by the Go
command which then triggers one of the file content formats before the search actually gets made.
One thing you can try is the IN
argument for find like this, without using the Go command at all:
Find IN="C:\Test\" QUERYENGINE=everything QUERY dm:last7days !attrib:HS files:"C:\Test\"
When I tested the original version you posted vs that with a folder full of images, the original indeed switched the folder format view, but that one seems to keep the search results view. So I think that will work.
Also you mention the Find
command only searching within the current folder. I believe that is because of the difference between everything
and everythingglobal
as the QUERYENGINE
value. It doesn't seem very well documented yet but it's mentioned on this wiki page:
https://docs.dopus.com/doku.php?id=reference:command_reference:internal_commands:cli&s[]=everythingglobal
Where it says:
everything | Search the current folder using Everything
everythingglobal | Search the whole system using Everything
I think doing IN
basically does the job of switching folders so that just using everything
instead of everythingglobal
is enough if you just want to search within a specific folder, but ensures the search result format is used.
If you want to search the whole system you can use everything global like:
Find QUERYENGINE=everythingglobal QUERY dm:last7days !attrib:HS
Though it seems like that, without IN
, ends up using automatic folder formats again. I'm sure there's a way to get format to work, it might be that whatever folder format is applied has some setting that doesn't override certain views, I vaguely remember seeing something about that, could be wrong though.
Edit: Ok so for my last point, I was able to figure out how to get it to always use a certain folder format for the results. And this probably more directly addresses your original question in your first post.
Turns out the behind-the-scenes path for the various queries are different. The command using IN
apparently produces a result path starting with coll://Find Results
, while the other one produces a result path in coll://%%Lister-Quick-Find-Results%%/...
So what we can do is go into the Preferences > Folders > Folder Formats, then click "Add" > "Path Format", and at the text box in the bottom enter this:
coll://%%Lister-Quick-Find-Results%%
The "Edit Format" window will come up but just hit "OK" for now to close it. Back in the Folder Formats preferences, look in the "Folder Type Formats" section, right click "Search Results", and hit Copy. Then right click on our new "Lister-Quick-Find-Results" path format and hit Paste. Finally double click our new format to bring up the Format Editor, and at the bottom left check the box that says "Use as the default format for all sub-folders", then hit OK.
I believe that should now apply even with the everythingglobal
example i gave above. If you want, you can also do the same process for Find Results by using the path:
coll://Find Results