Everything for xyplorer

Discuss and share scripts and script files...
abma
Posts: 3
Joined: 19 Feb 2020 10:16

Everything for xyplorer

Post by abma »

Hello everyone! This is a very simple but practical script I wrote myself,
Introduction:
This script calls Everything's command-line ES to import search results, is extremely fast, and supports Everything's syntax commands. If you don't have Everything installed, please go to the official website to download and install it.Make sure everything is started
[url https://www.voidtools.com/[/url]
Image

//==========================================================//
installation
Drag and drop the "EV FOR XY" folder in the archive to Scripts
Image

//==========================================================//
Run script
You can set a shortcut for this script:
Use-Manage Commands ...-Run Scripts-New
You can fill in the relative path of the script:
<xyscripts> \ EV FOR XY \ EverythingXYplorer.xys

//==========================================================//
Custom short name search
You can modify it yourself here
Image
//==========================================================//
Examples:
size:>1mb .pdf =PDF files larger than 1MB
!c:\ size:>1mb .pdf =PDF files larger than 1MB but without C drive
dm:today =File modified today
size:3mb-4mb
You can also use the short name defined by the script
zip: =zip,rar,cab,7z file type
//==========================================================//good luck
Attachments
EverythingXYplorer.zip
(431.38 KiB) Downloaded 521 times

Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Re: Everything for xyplorer

Post by Millzey »

Thanks for this. I routinely search roughly 200k file/folder names and after XYP goes without a search for some minutes, the search takes forever. I assume a cache of sorts has gone stale.

I also have a fearsome bug when rich moving a bunch of selections from search results, where it wont remove all or some of the source files, so I end up with duplicates all over the place. I'm hoping using a paper will be a workaround

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Everything for xyplorer

Post by admin »

If a search does not return immediately then it is no cached search. There is no other caching involved in a search. So, what kind of search is that? 200K is not such a big number...

GalebG4M
Posts: 8
Joined: 26 Feb 2020 18:37

Re: Everything for xyplorer

Post by GalebG4M »

Still, thanks for the script, I'll give it a try and will give my feedback as I use it!

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Everything for xyplorer

Post by Filehero »

Hi abma,

thanks a lot for your script. :tup:

Have you noticed that there already is a adapter script for Everything? If yes, is there a major difference in terms of function?

I don't want to sound disrespectful, I'm just trying to spot the difference before spending time for setup. :)

Thanks & cheers,
Filehero

rpnfan
Posts: 60
Joined: 07 Jan 2016 21:42

Re: Everything for xyplorer

Post by rpnfan »

admin wrote: 25 Feb 2020 10:11 If a search does not return immediately then it is no cached search. There is no other caching involved in a search. So, what kind of search is that? 200K is not such a big number...
A related question. XY does not use the search-technology from Everything for itself, right? That would be great and could speed things up drastically for functions like "Show folder sizes", which I would love to have always on, but it just slows down XY so much. :-(

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Everything for xyplorer

Post by highend »

XY does not use the search-technology from Everything for itself, right?
It doesn't. XY does not build indexes for drives / anything else.
One of my scripts helped you out? Please donate via Paypal

rpnfan
Posts: 60
Joined: 07 Jan 2016 21:42

Re: Everything for xyplorer

Post by rpnfan »

highend wrote: 29 Oct 2020 11:51
XY does not use the search-technology from Everything for itself, right?
It doesn't. XY does not build indexes for drives / anything else.
That's a pity. XY just could access the cache from Everything -- which in computer terms speaking is practically almost "free" without notable speed, memory or HD usage costs.

Horst
Posts: 1085
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Everything for xyplorer

Post by Horst »

I use Highend's Everything script in XY.
That gives you the full search functions of Everything and stores the results in a Paper folder.
Have a look at this
viewtopic.php?f=7&t=23224
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Everything for xyplorer

Post by Norn »

:arrow:
Last edited by Norn on 03 Feb 2022 00:59, edited 1 time in total.
Win10, Win11 @100% 2560x1440 22H2

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Everything for xyplorer

Post by RalphM »

@Norn: It might help if you also enlighten us with what changed in that last script to make it different/better than the previous ones.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Everything for xyplorer

Post by Norn »

Tips: abma's script use paper folder in UTF-8 or ANSI format.
Save the result to a file and open it as a paper folder (Paper folders support Unicode).

Change:
Replace & History...
goto ">cmt:$text"; //Highlight search keywords;Turn on Instant Color Filters
$delete = "!$ !@ !`% !# !\$Recycle.Bin"; //Exclude system invalid files It takes a few seconds.
Drag and drop the "EV FOR XY" folder in the archive to Scripts folder.
Script:

Code: Select all

/*
***************************************************************************************************
@Author  : https://www.xyplorer.com/xyfc/viewtopic.php?p=195781#p195781
@Created : 2020-02-19
@Modified: 2023-08-09
@Function: Everything For XY
@Version : v3.7
@Change  :
2023-08-09: Support adding quotes "" exact search
2022-11-04: Replace & History
***************************************************************************************************
*/



    // Handle .ini file
    $iniFile = "<xydata>" . "\" . "INI" . "\" . "EverythingForXY_LastQuery" . ".ini";

    // Write .ini file if missing
    if (exists($iniFile) != 1) {
        $iniContent = <<<'>>>'

// Cannot use <.> (.) etc as a separator
[EverythingForXY]
Query=Query1¶Query2¶Query3¶Query4¶Query5¶Query6¶Query7¶Query8¶Query9¶Query10

        >>>;
        writefile($iniFile, $iniContent, , "tu");                       // Save as Unicode
    }


// Get .ini file entries
 $lastQuery = getkey("Query", "EverythingForXY", $iniFile);
// Get the first value, the separator is ¶
 $lastQuery1 = gettoken($lastQuery, 1, '¶', "t");
// Replace ¶ to |
 $lastQuery =regexreplace($lastQuery, "¶", "|");



// Scripting
// ================================= settings =================================
	// -----------------search text process---------------
		$es 		= """<xyscripts>\EV FOR XY\es.exe"""; 				    // es.exe path
		$name       = now("yyyy-mm-dd-hhnnss");							    // Paper name
		$paper  	= "%temp%\EverythingForXYplorer\$name.txt";             // Paper path
		//$delete   = "!$ !@ !`% !# !\$Recycle.Bin";                        // It takes a few seconds


        $notes = "";
          $notes = <<<'>>>'
            Tips : Support everything syntax.
			                        PDF greater than 1mb:    size:>1mb .pdf
				                        Empty folder :                      empty:
		    
			            The left side automatically converts to the right
			                d: = Search directories          => folder:
			                 f: = Search file                       => file:
			                c: = Search content               => content:
			                p: = Search in current path  => path:<curpath >
							
			                p:c:Last    =>    path:D:\TXT content:Last
            >>>;



        $text = input("Everything for XYplorer", "$notes", "$lastQuery1", "s/e", "cancel", "510", "500", "$lastQuery", ":qns"); 
                                if $text == "cancel" {end 1==1;}

                                // Replace
                                $text=replace($text, "wjj:", "folder:");
                                $text=replace($text, "wj:", "file:");
                                $text=replace($text, "nr:", "content:");
                                $text=replace($text, "lj:", "path:");
                                $text=replace($text, "dq:", "path:<curpath>\ ");



    // ---------------------Short name---------------------					// Custom search short name,Users can modify it by themselves
        if $text == "office:" {$text = "*.doc|*.docx|*.ppt|*.pptx|*.mpaa|*.xlsx|*.xls";}
        elseif $text == "pic:"    {$text = "*.bmp|*.jpg|*.jpeg|*.png|*.tif|*.gif|*.pcx|*.tga|*.svg|*.psd|*.cdr|*.pcd|*.dxf|*.ufo|*.eps|*.ai|*.raw|*.WMF|*.webp"}
        elseif $text == "video:"  {$text = "*.avi|*.flv|*.mkv|*.mp4|*.mpe|*.mpeg|*.mpg|*.mov|*.rmvb|*.wm|*.wmv"}
        elseif $text == "zip:"    {$text = "*.zip|*.rar|*.7z|*.cab"}
    // -------------Special characters working-------------
	    //$text2  = replacelist("$text", '< > & | ^ "', '^< ^> ^& ^| ^^ \"', " "); //ES special characters need to be prefixed with "^"
        $text2  = replacelist("$text", '< > & | ^', '^< ^> ^& ^| ^^', " "); //ES special characters need to be prefixed with "^"
// ================================= script =======================
    // -----------------------search--------------------
        if $text != "*" and $text != "file:" and $text != "folder:" and $text != "" 
        {
                // Make sure the path exists
			    if(!exists("%temp%\EverythingForXYplorer")) {new("%temp%\EverythingForXYplorer", "dir")}
                //runret ("cmd /c chcp 65001 & $es $text2 >$paper");                               // Run cmd, use UTF8 format save to TXT file
				//runret ("cmd /c $es $text2  -export-txt $paper");
				run "$es $text2 -export-txt $paper",, 2, 0;                                        // Run cmd, Make the results of the search save to the $paper file

                //tab("newb", "This PC");                                // New background tab
                $size = report("{Size B}", $paper);                    // Get file size

                if(!$size) {
                   msg "No match found!";                              // Popup "No match found!"
				   //tab("close",, tab("get", "index")+1);
                } else {
				        //seltab +;
						tab("new");
                        paperfolder($paper, , , "l");                  // Open a file as paperfolder
                        //goto ">cmt:$text";                             // Highlight search keywords;Turn on Instant Color Filters
                        status "Query: $text";                         //Status query
                }



// Save last query to INI file
                $newLastQuery = "";
                $count = "0";

                // Foreach $lastQuery
                foreach($value, "$lastQuery", "|", "e") {
	               if($value != $text) {$newLastQuery .= "$value" . "¶";}      // if $value != $text, stack each item with the separator ¶

                   $count++;                      // $count + 1 each time

                   if $count == "10" {break}
                }


                if($text) {                       // Merges input values with old values, the separator is ¶
                   $newLastQuery = "$text" . "¶" . "$newLastQuery";
                   setkey $newLastQuery, "Query", "EverythingForXY", $iniFile;
                }

        } else {
                msg "The range of keywords you entered is too large. Please try another keyword";
        }
// ================================== END ===================================
Attachments
EverythingForXYplorer_v3.7.zip
(804.86 KiB) Downloaded 31 times
EverythingForXYplorer_v3.6.zip
(669.97 KiB) Downloaded 30 times
EverythingForXYplorer_v3.5.zip
(667.66 KiB) Downloaded 54 times
Everything for XY.png
Everything for XY.png (20.29 KiB) Viewed 3623 times
Last edited by Norn on 09 Aug 2023 17:16, edited 10 times in total.
Win10, Win11 @100% 2560x1440 22H2

wf2zxp
Posts: 2
Joined: 25 Apr 2022 09:26

Re: Everything for xyplorer

Post by wf2zxp »

搜所带间隔号的关键字比如"インモラル・イリュージョン"就会在结果中显示"インモラル?イリュージョン"
2022-04-25_153117.png
2022-04-25_153117.png (11.12 KiB) Viewed 3248 times
所有间隔号都显示“?”点带“?”的结果就会显示“位置当前不可用”

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Everything for xyplorer

Post by Norn »

I don't know more...
Open %temp%\EverythingForXYplorer
Open the .txt file with the same name as the paper folder
Replace "?" to "・"
Save as "UTF-8 with BOM" format to replace .txt file.
Refresh paper folder.
Attachments
Save as unicode format.png
Save as unicode format.png (9.8 KiB) Viewed 3227 times
Save as UTF-8 with BOM.png
Save as UTF-8 with BOM.png (7.75 KiB) Viewed 3227 times
Win10, Win11 @100% 2560x1440 22H2

wf2zxp
Posts: 2
Joined: 25 Apr 2022 09:26

Re: Everything for xyplorer

Post by wf2zxp »

这种方法只是临时性的,下次搜索带间隔号的文件还会显示为问号……用论坛里的其它EVERYTING脚本倒是显示正常但会报各种奇葩的错误,用这个不报错但会发生这种显示错误,也是醉了,不知哪里的问题,可能是简中系统的问题吧……还是用回Everything本体算了 :shock:

Post Reply