Different Folder Indexes

Have a suggestion for "Everything"? Please post it here.
Post Reply
shimsh
Posts: 2
Joined: Mon Feb 05, 2018 3:07 pm

Different Folder Indexes

Post by shimsh »

Hi,
I use Everything on an hourly basis, however, as a sys admin I require lots of times to search elsewhere on the network, and not in the default location.
This will make me go into the options and add the folders I want to search for (usually an admin drive c share) however, this will rebuild the index from scratch, which takes time, therefore I would remove the existing folders, and will add only those I need at the moment, then, when I found what I need, I will remove that folder and add the regular folders I need.

My suggestion is that one should be able to "export" and "import" the index and its settings (folder paths etc), or to be able to have a primary search settings and a secondary, temporary search index.

Regards

PS: this is my default folder search location, 3M+
Everything_2018-02-05_11-38-21.png
Everything_2018-02-05_11-38-21.png (69.79 KiB) Viewed 4713 times
NotNull
Posts: 5246
Joined: Wed May 24, 2017 9:22 pm

Re: Different Folder Indexes

Post by NotNull »

You can do that already with the current Everything: you can use a separate instance for your temporary connections, while leaving your "basic/default" Everything as-is.
More on instances: http://www.voidtools.com/support/everyt ... instances/
NotNull
Posts: 5246
Joined: Wed May 24, 2017 9:22 pm

Re: Different Folder Indexes

Post by NotNull »

Here you go:a Powershell script. Maybe that explains it a little better.

Save the script as Show-TempIndex.ps1 in the folder where your Everything.exe is located.

Run .\Show-TempIndex.ps1 -? or get-help .\Show-TempIndex.ps1 -Examples to get the idea.
It is tested, alhough not thoroughly.


Show-TempIndex.ps1

Code: Select all

#=============[ HELP txt ]==================================#

<#
.SYNOPSIS
  Specfy a servrename and (optionally) a sharename (default: C$) an path. This script will create a special Everything.ini and start Everything with it. It will folder-index \\server\share\path. No database will be written to disk on exit. 
  
.DESCRIPTION
  Run a temp Everything.exe with a folder index of a (remote) share(\path)


.NOTES
  Version:  0.1 by NotNull (2018-02-05)


.EXAMPLE
	.\Show-TempIndex.ps1
	Will ask for a servername and indexes \\servername\C$
.EXAMPLE
	Show-TempIndex localhost
	Will index \\localhost\C$
.EXAMPLE
	Show-TempIndex MyServer
	Will index \\MyServer\C$
.EXAMPLE
	Show-TempIndex MyServer D$
	Will index \\MyServer\D$
.EXAMPLE
	Show-TempIndex  MyServer C$\\Windows
	Will index \\MyServer\C$\Windows
	Note: every \ in the share-path should be written as \\
.EXAMPLE
	Show-TempIndex  -serverName "MyServer" -shareName "C$\\Windows"
	The official way of specifying parameters ....  
#>

#=============[ Parameters ]================================#

Param(
  [Parameter(Mandatory=$True,Position=1)]
   [string]$serverName,
	
   [Parameter(Mandatory=$False,Position=2)]
   [string]$shareName='C$'
)


#=============[ CD to scriptfolder ]========================#

Set-Location "$PSScriptRoot"


#=============[ Exit running TEMP Everything ]==============#

Start-Process ".\Everything.exe" "-nodb -instance TEMPINDEX -quit" -Wait


#=============[ Create fresh INI ]==========================#
@"
[Everything]
last_options_page=13
run_as_admin=0
run_in_background=0
show_in_taskbar=1
show_tray_icon=0
minimize_to_tray=0
check_for_updates_on_startup=0
auto_include_fixed_volumes=0
auto_include_removable_volumes=0
auto_include_fixed_refs_volumes=0
auto_include_removable_refs_volumes=0
hide_on_close=0
folders="\\\\$serverName\\$shareName"

"@ | Out-File ".\Show-TempIndex.ini" -Encoding ASCII


#=============[ Start TEMP Everything ]=======================#

.\Everything.exe -nodb -instance TEMPINDEX -config .\Show-TempIndex.ini

Good luck!
Last edited by NotNull on Tue Mar 06, 2018 7:54 pm, edited 1 time in total.
NotNull
Posts: 5246
Joined: Wed May 24, 2017 9:22 pm

Re: Different Folder Indexes

Post by NotNull »

I'm curious: did this work for you?
shimsh
Posts: 2
Joined: Mon Feb 05, 2018 3:07 pm

Re: Different Folder Indexes

Post by shimsh »

Sorry for my late response, it works perfectly!

thanks a lot
NotNull
Posts: 5246
Joined: Wed May 24, 2017 9:22 pm

Re: Different Folder Indexes

Post by NotNull »

Thanks for the feedback!

I asked because I had a slight improvement (no need posting that if it wasn't what you wanted):
You no longer have to enter "\\" in share-paths, but just a single "\".

For that to work, you have to replace the line containing folders="\\\\$serverName\\$shareName" with:

Code: Select all

folders="\\\\$serverName\\$($shareName.Replace('\','\\'))" 
Post Reply