SearchEverything: Getting Opus to work with Everything

Just wanted to say a huge thank you for this! I've been using Search Everything for quite a while and a new user of DO, so having these two combined is just amazing :slight_smile:

1 Like

You're quite welcome.
Welcome to the community and thanks for reminding me why I'm doing this :grin:
Your words mean a lot to me. :smile:

When I think about it, my posts are always straight down to business so I rarely spend time to show my appreciation to John, Leo and the entire dopus community for making and supporting the best file expolorer/manager. So here's the long due Thank you from myself as well.

1 Like

Dear apocalypse we are new user, So if possible please make 7 different button for us for searching for Audio file, compressed file, document file, Video file, picture and search for folder

That's only six things, and a bit vague for someone to implement. (How do you define "video files"? That could mean a lot of different things.)

It's a little rude to ask someone to make seven different things for you. Khalid, you ask on the forum for a lot of very esoteric things but seem to show no interest in learning how to make them yourself, or understanding what you've been given to adapt it for your many other needs, and becoming self sufficient. It is a bit rude at this point, to be honest.

5 Likes

I am really sorry if I do any stupid questions. I am trying to learn directory opus. But I have no programing skill. And Search in youtube there is no video tutorial about button coding also.
Before some month I have no idea how to add a command in a button code.
But now I can create some simple button as well for myself. That means I am learning. I don't get enough time for learning. I Think If some one give me one button code, I can try to make rest of the button.
How do you define "video files"?
we have a file type group in directory Opus called "Movies". so may be there is an way to declaration some thing like that grab:movies,
Or may We can add random file extension in button code for define video or audio files.

Sorry, may be for offtop, but how can i open search results in a new tap instead of new lister?
and how can i search without this black window? (all this only in win10, on win7 i have used old SearchEverything.exe, not coreCLI)

@fkast

To hide the console window edit your button and append @runmode:hide at the start.
Search results should open in a new tab by default and not a new lister unless you tinkered with your settings to make new tabs open in a new lister.

Check your button code again. For the simplest setup it should look like this:

@runmode:hide
Go NEWTAB 
"SearchEverythingCoreCLI.exe" "{dlgstring}"

First off, I love this integration and appreciate the work on it. I'm wondering if there's a way to not open a new dopus window when I use the "right-click" Search Everything for Current Clipboard Text option. Sometimes I'm doing a lot of searching and wind up with 10-15 dopus windows open.

I don't see an option in the button code, but no doubt I'm probably missing something.

Thanks!

Look at the post directly above yours for the button code.
Change {dlgstring} to {clip}.

Unless you start either dopus as admin or searchEverything as admin and both have the same elevation privileges using the button SHOULD open a new tab and load the collection with the search results in there.

1 Like

Thanks for the reply. Strangely, once I shutdown for the night and restarted the computer in the morning, the expected behavior for a new tab started happening. I'm good!

Last time I looked at this thread, I saw that the instruction on the first post were from 2009, and that one of the comments on the first page was talking about how DOpus would need to get restarted for the database to be updated. I gave up on this and moved on.

I'm glad I came in to check on things again. Scrolling down 170 posts, over ten years of thread stuff, took a while, but I think it was worth it.

I followed the instructions in the first post. It works, but it's weirdly slow. Much slower than the Everything search bar I normally use. I also just did a search for a short, generic term that shows almost ten thousand hits in the Everything window, but when I did that in the DOpus window, the program froze for over a minute.

Is this the normal, expected behaviour because it has to add all the search results into a custom collection?
Will it go away once I restart?
Does it matter that I didn't touch my existing Everything installation and just added the SearchEverything folder to the Programs folder? (Does it need to rebuild the database with every search or something like that?)

I normally do a wide search in Everything and then gradually get more specific before either opening up the file itself, or opening the file location in DOpus anyway. I'm not sure if this button is a big upgrade with the search delay and the apparent removal of the ability to search file types (the "Pictures", "Executables", "Audio", et cetera, as defined by Everything). Still, it's really neat to be able to tinker with this and try new ways of doing this.

(I also took the 32x32x32 .ico file from within the Everything executable and used it as the icon on the button. I think it adds an extra touch.)

First of all, Apocalypse, a big thank you for this very useful tool.
I have been using it for quiet a while now (version 4.0) and so far, despite quiet a few clean installs of my computer I never had any problem getting it to work, until now that is.
This time, no way, I tried, and tried, and tried again but no way to get it to work, I only got grey everything icons in the taskbar with a star in the middle, nothing else.
So, I decided to install the new version of your tool, no luck: a command line windows appeared with a message and disappeared before I was able to read it (I finally managed to by taking a picture of my monitor). The message was

Unhandled Exception: System.ArgumentNullException: value cannot be null.
Parameter name: path1
    at System.IO.Path.Combine(String path1, String path2)
    at SearchEverythingCoreCli.Dopus.GetDopusPathFromRegistry()
    at SearchEverythingCoreCli.Program.Main(String[] args)

So, I decided to have a look at you code on git and after finding the Dopus.GetDopusPathFromRegistry() function I went windows registry editor and didn't find any reference to dopus path in it. So I created a new key (DOpus.exe), and two new REG_SZ values

Name        Type           Data
(Default)    REG_SZ    C:\Program Files\GPSoftware\Directory Opus\dopus.exe
Path          REG_SZ   C:\Program Files\GPSoftware\Directory Opus

After rebooting it finally worked :grinning:
So, apparently (at least it happened to me), the latest version of Directory Opus doesn't add a key in the registry and it causes the tool to fail.
I thought that over time, other people would have the same problem and I'd better share my solution.
Again, a big thank you :smiley:

1 Like

As long as everything is running as a service - searching should be instant. I tested with a search result set of 200'000 files (out of >100 million) and it took < 1sec to do the search and pass the collection to dopus. Dopus then took a few minutes to load all metadata in the details view. I don't see a reason for the slowdown. Maybe try to start searcheverything manually and measure how long it takes until it completes.

That's some nice detective work on your side. :+1:
Very strange indeed that DOpus didn't add that reg value upon installation.
The only time that should happen is with portable installs.
Maybe relying on that wasn't such a great idea.
Anyway, glad you managed to fix it and thanks for sharing the solution :smile:

What do you mean by doing the search and loading the metadata in the details view? Are you supposed to be able to see the searched files in the opus window and scroll to select files as normal while the metadata is being loaded?

What I am experiencing when I enter a search is that the current tab or page I'm is goes blank for part of a second, then I get a grey bar labelled "Reading folder" with a green activity indicator underneath it, and an abort button underneath that.

I am unable to see the files in the dopus window until after the "reading" process is finished. This process might take seconds or a minute or so, depending on how many files and folders were introduced.

Is it the case that you consider "the search" to be finished when SearchEverything is finished gathering the data, but before I'm able to see and interact with the Collection of files in DOpus?

That's on DOpus. EverythingSearch only generates a collection and passes it to dopus and that happens almost instantly as I mentioned. Dopus reads the collection and that's what is slowing you down if it's too large. Reducing your result set looks like the only way to go. Maybe rethink your strategy.

Then I think I'm missing something. What advantages does integrating this into DOpus give? It sounds like an objective downgrade in most respects.
I don't consider the search actually completed until I can see and interact with the results. I'm an end user trying to find and interact with files, not a program doing it's own sorting.

The advantage is that you get results in a lister without having to drag them to a new collection every time and can then use all your dopus views, columns, queues, functions, scripts, rules and manipulations natively on those files in dopus. Nothing stops you from just doing the former and no one forces you to use it either.

@apocalypse is there a way to load the server-interfacing SDK "Everything64.dll" and make IPC calls directly from within a DO script addin instead of going indirectly by calling your CLI implementation that calls on this SDK dll?

I'm just trying to create a custom file/folder size column and I don't need any collections, I just need to extract one single property for each path item — its size. There is a simple Python example in the Everything SDK pack using ctypes.WinDLL which allows to do exactly this, but I have no idea whether it's possible to do that in a DO JScript and thought you might have an idea
Thanks!

@eugenesv I'm afraid jscript and vbscript don't facilitate calling conventions in dll functions by themselves. Afaik dopus can use python and perl scripts if the interpreters are installed but I haven't delved into that field. The way I see it without those is perhaps calling an external program/script to generate the info you need by saving it to a temp json file for example and when the external one completes you consume the output in your dopus script. I've used this approach to add a column with custom generated data when making Column based on Descript.ion-style file parsing. Still it's not that convenient so someone else might provide a better solution.