GP SoftwareTwitter
Opus FAQsManualCommandsObjects

SearchEverything: Getting Opus to work with Everything v4.0


#1

PHPBB_IMPORT_WARNING CODE_NEAR_LI

NEW VERSION 4.0.0.0 Released. Download below.

>>> INTRODUCTION
[ol]
Everything is, as some of you already know, a nice little program similar to Indexers like Google Desktop Search and Windows Search except it is a lot smaller and takes less than 10 seconds to index more than 500000 files. It indexes only filenames and paths and relies on the USN journal of the NTFS filesystem to instantly detect and display changes.
Pros: Lightning fast, Light and unintrusive, instantly detects changes
Cons: Only works with NTFS, Only has Details view as of now, Requires UAC elevation (if UAC is enabled)

SearchEverything brings you those filesystem-wide search results to dopus as a collection where you are free to do whatever you wish with the full power of the opus.
[/ol]
>>> TUTORIAL
[ul]
[li]Download "Everything" and the Everything Command-line Interface (es.exe [not needed for 3.0.0+]) from here.[/li]
[li]Download SearchEverything package and extract to a folder (ex. Program Files\Everything)[/li]
[li]Start "everything"[/li]
[li]Add the button code below to your toolbar. You WILL need to edit the paths where the buttons point to. If you're in portable mode use relative paths.[/li]
[li]See appendix after button code for button function descriptions.[/li][/ul]

>>> DOWNLOAD 4.0.0.0
SearchEverything v.4.0.0.0.rar (62.3 KB)
>>> DOWNLOAD 3.0.0.0
SearchEverything.v3.0.0.rar (65.2 KB)
>>> DOWNLOAD 2.2.0.0
SearchEverything 2.2.0.0.rar (41 KB)

>>> UPDATE v.4.0.0.0 DOPUS 10+ ONLY IMPORTANT
[ul]
[li]Fixed compatibility with 1.4.0.x beta versions of everything[/li]
[li]Using net framework 4.5.2 (no need to install 2.0 on windows 10 anymore)[/li][/ul]

>>> UPDATE v.3.0.0.0 DOPUS 10+ ONLY IMPORTANT
[ul]
[li]Completely rewritten (again) to utilize included Everything.dll enabling direct communication with Everything.exe via IPC (dll is from david's everything sdk)[/li]
[li]es.exe is no longer needed[/li]
[li]Instant retrieving of results (although it takes a while for dopus to initialize the collection).[/li]
[li]No more codepage conversions. All (as opposed to everything) is now done in unicode via IPC. If a filename is garbled - blame the IPC Api.[/li]
[li]Added manifest to require administrator elevation when run (required to interact with Everything.exe)[/li]
[li]Added switches --install and --remove to respectively install/uninstall the "Everything://" protocol handler. Read more about it below.[/li][/ul]
>>> UPDATE v.2.2.0.0 DOPUS 10+ ONLY IMPORTANT
[ul]
[li]Fixed searches with 1 result returning 0 results[/li]
[li]Added commandline switch "--query" >> displays a search input dialog (defaults content to clipboard)[/li]
[li]Added commandline switch "--clip" >> runs a search for the current clipboard text (if any)[/li][/ul]
>>> UPDATE v.2.1.0.0 DOPUS 10+ ONLY
[ul]
[li]Fixed hang on searches with many results by adding default timeout on search = 500ms (tested with 12000 results, changeable in config)[/li]
[li]Optimized search (not using cmd anymore)[/li]
[li]Moved go path=coll://Everything/ to SE. Results appear as soon as we get them. Remove that line from your buttons to avoid double redraw[/li]
[li]Added commandline option: "--genconfig" to generate sample config file which you can edit afterwards[/li]
[li]Added config option MaxExecutionTime - maximum time in ms to wait for results from es (default: 500)[/li]
[li]Added config option PopupDisplayTime - maximum time in ms to display result popup. Set to 0 to disable popup. (default: 2500)[/li]
[li]Added config option MaxResultCount - placeholder only, not yet implemented[/li]
[li]Fixed result missmatch of 1[/li][/ul]
>>> UPDATE v.2.0.0.0 DOPUS 10+ ONLY
[ul]
[li]Completely rewritten in C# .net 2.0[/li][/ul]
>>> TOOLBAR BUTTON for v.2.1.0.0 UPDATED [11-06-04 23:20 CET]
(USAGE: copy code, right click toolbar in dopus > customize > right click anywhere on the toolbar again > paste > voila)
NOTE: If you have UAC enabled you MUST have @admin present in the button function for SE to work so get the below updated code again if you added it before the update.

<?xml version="1.0"?>
<button display="both" label_pos="right" separate="yes" type="three_button">
	<label>Everything</label>
	<icon1>#default:find</icon1>
	<button display="both" icon_size="large" label_pos="right">
		<label>Everything (Dialog)</label>
		<tip>Search Everything for Specified Keyword(s)</tip>
		<icon1>#default:find</icon1>
		<function type="normal">
			<instruction>C:\Program Files\Everything\SearchEverything.exe &quot;{dlgstring}&quot;</instruction>
		</function>
	</button>
	<button display="both" icon_size="large" label_pos="right">
		<label>Everything (Clipboard)</label>
		<tip>Search Everything for Current Clipboard Text</tip>
		<icon1>#default:find</icon1>
		<function type="normal">
			<instruction>C:\Program Files\Everything\SearchEverything.exe &quot;{clip}&quot;</instruction>
		</function>
	</button>
	<button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none">
		<label>Everything (Program)</label>
		<tip>Starts / Brings Everything to Front</tip>
		<icon1>#find</icon1>
		<function type="normal">
			<instruction>cd C:\Program Files\Everything</instruction>
			<instruction>C:\Program Files\Everything\Everything.exe</instruction>
		</function>
	</button>
</button>

>>> BUTTON FUNCTIONS
[ol]
[Left Click - Default Behavior] Displays an input box to enter search criteria (any part of a filename is ok)
[Right Click - ClipboardString] Directly searches with the current clipboard text as keywords
[Middle Click - Open Everything] Starts everything (if not running) and opens a new everything window
[/ol]
>>> FAQ
[ul]
[li]Q: ES is not starting. Gives me cryptic errors. A: Install .net framework 2.0 for windows or reinstall your current one[/li]
[li]Q: Why do I get an elevation prompt asking me for administrative privileges every time I search? A: You have UAC enabled. Everything.exe implicitly requires elevation and as such the tools interacting with it need that as well to be able to query it.[/li]
[li]Q: ES does not run on Win98... A: And DOPUS does? Only NT based XP+ OS' supported.[/li][/ul]

>>> PROTOCOL HANDLER FUNCTIONALITY
[ul]
[li]You can register a protocol handler using:
SearchEverything --install (remove it using SearchEverything --remove)[/li]
[li]When installed you can hit Win+R and type everything://your search terms hit enter and see your results in dopus.[/li]
[li]This becomes useful as you can code a page and make links using the same protocol handler so clicks inside your browser trigger searches.[/li][/ul]
OLD STUFF STOP READING iF YOU ARE USING DOPUS10+

VERSION 1.2 [2009/12/08 21:40] KNOWN ISSUES
SearchEverything1.2build20091208-2140.rar (205 KB)
[ul]
[li]NO UNICODE SUPPORT (GET DOPUS 10 AND USE SEv2.0)[/li]
[li]SLOW LOADING OF RESULTS (1 by 1)[/li]
[li]LIMITED RESULTS (due to slow loading)[/li]
[li]NOT SO PORTABLE[/li][/ul]
VERSION 1.2 BUTTON CODE

<?xml version="1.0"?> <button display="both" icon_size="large" label_pos="right" type="three_button"> <label>Everything</label> <icon1>#default:find</icon1> <button display="both" hotkey="f3" icon_size="large" label_pos="right"> <label>Everything</label> <tip>Search Everything for Specified Keywords</tip> <icon1>#default:find</icon1> <function type="normal"> <instruction>Delete FILE=coll://Everything QUIET </instruction> <instruction>CreateFolder NAME=coll://Everything</instruction> <instruction>/home\Apps\searcheverything.exe {dlgstring}</instruction> <instruction>Go PATH=coll://Everything</instruction> </function> </button> <button display="both" hotkey="alt+f3" icon_size="large" label_pos="right"> <label>Everything (Clipboard)</label> <tip>Search Everything for Current Clipboard Text</tip> <icon1>#default:find</icon1> <function type="normal"> <instruction>Delete FILE=coll://Everything QUIET </instruction> <instruction>CreateFolder NAME=coll://Everything</instruction> <instruction>/home\Apps\searcheverything.exe {clip} </instruction> <instruction>Go PATH=coll://Everything</instruction> </function> </button> </button>


Fast search with Everything
DOpus 10 & Everything
AHK script for Voidtools Everything use with Dopus
Search Everything integration
DOpus12.3.3 Dark grey-blue
Search everything
Ktbcrash Inspired - CCleanerish
Dark Grey-Blue
DOpus 10 & Everything
#2

Hello,

thanks for the scripts but I cannot get it to work. The only difference on my system that the installation path to DOpus is

C:\Program Files\GPSoftware\Directory Opus

Tried to modify the ahk-script with

if 0 < 1
{
    Run,%A_WorkingDir%\..\..\Everything\Everything.exe
    ExitApp
}
everythinges = %A_WorkingDir%\..\..\Everything\es.exe

But this doesn't help. Any help much appreciated.

Regards
xbprm


#3

The following code works


#SingleInstance, force
; SearchEverything Wrapper by Devocalypse
; Uses CMDRet by corrupt (http://www.autohotkey.com/forum/viewtopic.php?t=3687)
if 0 < 1
{
    Run,C:\Program Files\Everything\Everything.exe
    ExitApp
}
everythinges = C:\Program Files\Everything\es.exe
cmdstring = "%everythinges%"

Loop, %0%
{
    param := %A_Index%
    IfInString, param, %A_Space%
  {
   cmdstring = %cmdstring% "%param%"
  }
else
  {
    cmdstring = %cmdstring% %param%
  }
}
results := CMDret(cmdstring)
Loop, parse, results, `n
{
if A_LoopField
   {
    RunWait,"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Copy TO="coll://Everything" COPYTOCOLL=member FILE="%A_LoopField%",,Hide
    clipboard = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Copy TO="coll://Everything" COPYTOCOLL=member FILE="%A_LoopField%"
   }
}
CMDret(CMD)
{
  VarSetCapacity(StrOut, 1000000)
  RetVal := DllCall("C:\Program Files\GPSoftware\Directory Opus\Apps\cmdret.dll\RunReturn", "str", CMD, "str", StrOut)
  Return, %StrOut%
}

Now trying to make it independent from actual installation path.


#4

I know I should have made the paths absolute but i decided against it for better portability if you export to a USB.

You changed the correct paths. I do not see a reason for it not to work. The only possible explanation could be if you run it as a script instead of a compiled executable. I will test a few scenarios and let you know what i find out.

Edit: It seems the working directory is the problem. I will rewrite the ahk source to use the Script Dir and get dopusrt path from registry. Expect a new version within an hour or two.

Edit2: Updated to version 1.2. It seems there is no proper path in registry under HKLM or HKCU for Dopus and since "Everything" is portable there is no foolproof way to find these paths so you have to manually specify the paths in SearchEverything.ini contained in the version1.2 rar.
Note: Do NOT add a trailing slash \ after the paths


#5

hi apocalypse,
i am trying to get your little tool to work, but something isn't working. i am only getting this output "Everything IPC service not running." how do i run the ipc service? i can't find any info about this problem.

thanks neophite


#6

[quote="neophite"]hi apocalypse,
i am only getting this output "Everything IPC service not running." how do i run the ipc service?[/quote]

I checked and I get the exact same output when Everything.exe is not running in the background. This is just a fronted for it so it needs to be in the taskbar or system tray, besides database updates cannot happen if Everything is not running.

There is a possibility to start it just for the duration of the search but that would be beyond the point of having fast results. If you press the search button and then don't enter anything as a search term and hit ok it will start everything.exe itself.


#7

hi apocalypse
everything was running, but i forgot to start it with admin rights :unamused: after doing that everything works fine...
i hope you / the dopus developers find a solution for the collection import.
btw great addon for 2 great programs :smiley:


Google from Dopus
#8

I'm not an Opus developer, so I caution you to tread carefully with what I'm about to suggest. (Be sure to back up your Opus configuration before you try anything.)

Opus file collections are just plain text XML files named with a .col extension. So you should be able to you to create them externally from Opus, provided you get the content schema correct. From what little I know of this, there are a couple of issues you need to workaround.[ol][li] Certain meta data is stored for each file as an attribute for that file's element inside the .col file. Many of these attributes are not stored as plain text or decimal values.

The fields I see in my .col files are:[ul]
[li] access[/li]
[li] create[/li]
[li] modify[/li]
[li] attr[/li]
[li] size[/li][/ul]

I do not know if this is the extent of all meta data stored inside of a .col file, or if it is related to my Collections default format.

I believe size is stored as the number of bytes in octal format; thus, the file element for a file that is 26 bytes, would have an attribute of size="32". I do not know how the date/time fields are stored (access=, create=. modify=), nor the attributes (attr=).

For what it is worth, I have tried creating a collection .col file with no meta data for any files. The resulting file collection in Opus will show all the files with 0kb size and the date/time stamps fields will all be blank, et cetera. Opus doesn't seem to hang or anything on such lack of meta data. However, a collection with only file names and paths may be of little or no value.

Like I said , I'm not an Opus developer, so this is all just what I have gleaned from my own observations.
[/li]
[li] As you may already be aware the .col files can be copied to your /dopusdata\Collections folder, after which you must restart Opus before the new collections take effect.

This thread has some relevant discussion.[/li][/ol]

Hopefully this helps you some.


#9

Thank you for the insight Kenneth.
I am aware of the location of the collection files and their xml schema. The problem is mainly that you have to restart dopus after editing any of those files before the changes are read by it so it becomes a problem. AFAIK there is no way to load or reload a collection with a command within opus without having to restart.

Concerning the metadata i think it only appears in special collections such as find duplicates or search results.

I made an experiment with a custom collection and copied some random files' paths to it. Restarted dopus and all the columns were correct. That is version 9.51 though so I am not sure about the older ones. I'm trying now to invoke some way of refreshing the collection from within dopus and will keep you posted with my progress.


#10

Hi apocalypse,

now it works perfectly. Thank You.

Regards
xbprm


#11

apocalypse,

This is the best tool I've found all week!

Thanks again.

Paul


#12

Thank you for this guide apocalypse, however I do have a question about the behaviour of the Z-ExploreFile command.
In Everything v1.2.1.451a, if I use the 'Open Path' command on a folder, it opens the actual folder that has been selected not the directory that contains it.
Is there any way to get it to work such that DOpus will go to the directory containing the folder and select the folder?

Thanks again for this guide, it's been most helpful.


#13

In

Go PATH="&filename&"
Select PATTERN="&filename&"

Idea was that when you pass a filename (not a foldername) dopus opens its parent folder regardless of that it's a file and not a folder path and then the command is issued to select the file.

It's not the case with archives and folders it seems. I'll have to write a script to intercept and split the path and then pass the parent path and the filepath / foldername or understand the cryptic everything.ini more and find a way to pass both arguments from there.


#14

After some testing heres the AHK code:[code]
#SingleInstance, ignore
#NoTrayIcon

if 0 > 1
exitapp
if 0 < 1
exitapp
else
argpath = %1%

dopusdir = YouDopusFolder

SplitPath, argpath , filename, dirname, extension, namenoext
Run, "%dopusdir%\dopusrt.exe" /cmd Z-Everything FILENAME="%filename%" DIRNAME="%dirname%"
exitapp
[/code]
Command Code: [code]

<?xml version="1.0"?> Z-Everything Launch Lister and Focus File dirname,filename,filepath #cli Go PATH="&dirname&" Select PATTERN="&filename&" DESELECTNOMATCH [/code] Everything INI code:[code] open_folder_path_command=$exec("folder_where_you_put_it\ExploreFolder.exe" "%1") [/code]

This works good in general BUT here comes a BIG problem:
dopus SELECT always interprets the pattern as the dreaded Pattern Matching Syntax suggests so that if your filenames have characters like [ ] ( ) # ~ they get intepreted as operators and not as filenames and nothing gets selected.

I tried search and replace within the script but the escape character poses a problem for the commandline which gets passed to opus afterwards, I mean why the hell use ' when you can use backslash or ` as in every common language.

We need a simple /selectfilepath command which works on the entire filename as windows explorer does (explorer.exe /select,) or a way to switch the useless pattern matching syntax off)


#15

Thanks for the guide, unfortunately I use the characters that you pointed out quite a bit so it's probably best for me to stick with the original command.


#16

Have downloaded SearchEverthing portable version and extracted in F:\Everything.

How to make it work with DO ?

thanks


#17

SearchEverything: Getting Opus to work with Everything


#18

[quote="apocalypse"]

Before I start you will need both everything and the Everything Command-line Interface (es.exe) in the same folder (ex. Program Files\Everything). So if you dont have them, get them here.[/quote]

What is the difference of everything and "the Everything Command-line Interface". Sorry for the question apocalypse, cause I am a new user of Directory Opus... I really need to learn and undergo different tutorials to interact with DOpus features.

Thanks in advance,
JMcGrey


#19

One is a GUI and the other is a CLI.


#20

One is a GUI and the other is a CLI.[/quote]

I still don't get it! Can you refer me a thread which start the topic of GUI and CLI in this forum, but i will try to read the post in the link you provided. Thanks