Integration of Everything [voidtools]

Discuss and share scripts and script files...
Post Reply
highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Integration of Everything [voidtools]

Post by highend »

I think it's a good change trying to protect XY from crashing :whistle:

So, v0.9.2 is out.
; Querying a drive at its root level (no subfolder used) can easily
; crash XYplorer (because of too many items in the search result)
; E.g.: C:\, f:C:\ or d:C:\
; Default: true (to disable this, use: false)
; If set to true, this behavior can be overriden with the " /f" switch
; at the end of the query
; E.g.: C:\ /f, f:C:\ /f or d:C:\ /f
ConfirmRootDrive=true
So if you don't want to be bothered with that security mechanism, change ConfirmRootDrive=false
or if you don't want to turn it off, use the /f at the end of the query...
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by Filehero »

:tup: :)

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

Re: Integration of Everything [voidtools]

Post by Horst »

I found a type of Everything query which the script currently doesn't handle.
In the Everything GUI and the es.exe tool the following example is a valid query
c:\temp\download\everything *.zip zip-file-name:"Everything64.exe"
It searches in the folder c:\temp\download\everything thru all zip files for the filename Everything64.exe
This works for Total Commander (uses the Everything SDK)
and also in my Cmd script for Free Commander which uses the es.exe tool.
In the XY Everything script the result is "No match(es) found..."
The real result of es.exe is
Screenshot - 24.09.2021 , 14_58_02.png
Screenshot - 24.09.2021 , 14_58_02.png (9.21 KiB) Viewed 3165 times
From the help

container-file-name:
container-file-names:
zip-file-name:
zip-file-names:

Search zip files for the specified semicolon (;) delimited list of filenames.

Examples:
container-file-name:Everything.exe
container-file-name:Everything.exe;Everything.chm
regex:container-file-name:^Everything
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

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

Re: Integration of Everything [voidtools]

Post by highend »

Comment out this line:

Code: Select all

$query = regexreplace($query, '\b-(?!([riwps]|n (?!\d))\b)', '"-"');
Then use the script for a week and tell me if you found anything that doesn't work anymore^^
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by Horst »

Thanks for the fast response.
It works with all basic constructs from the help so far. :D
I'll test it as requested the next few days and report any problems.
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

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

Re: Integration of Everything [voidtools]

Post by Horst »

To get the same resuluts as the es command line query for the regex: examples from the help
I had also to comment out the following

// Do NOT escape double quotes!
// $query = replacelist($query, '< > & | ^', '^< ^> ^& ^| ^^', " ");
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

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

Re: Integration of Everything [voidtools]

Post by highend »

I had also to comment out the following...
This can lead to problems...

E.g. the path contains a & but no space (so that you wouldn't need to quote it by default)

No problem:

Code: Select all

es.exe "D:\Temp\archive\d&e" *.zip regex:zip-file-name:^SH_BG4_Sofia
Problem:

Code: Select all

es.exe D:\Temp\archive\d&e *.zip regex:zip-file-name:^SH_BG4_Sofia
No problem if the & is escaped

Code: Select all

es.exe D:\Temp\archive\d^&e *.zip regex:zip-file-name:^SH_BG4_Sofia
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by Horst »

There is a problem in this cases but the user can still add his own quoting around the whole string.
My test case was
c:\temp\download\everything regex:container-file-name:^Everything
Without my last change the query didn't find files in the zips where the name starts with E
Using the ^ in RegEx is a very common usage.
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

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

Re: Integration of Everything [voidtools]

Post by highend »

For the moment use this instead:

Code: Select all

    // Escape characters but only if the "regex:" modifier is not found!
    if (!regexmatches($query, "\bregex:")) {
        $query = regexreplace($query, "(<|>|&|\||\^)", "^$1");
    }
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by Horst »

Looks fine so far.
All tests show the same results as the es command line.
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

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

Re: Integration of Everything [voidtools]

Post by highend »

Ok, released v0.9.3 with "smart mode" completely disabled and character escaping only when no regex modifier was found...
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by highend »

v0.9.4 released

The changes regarding escaping a query were not sufficient in v0.9.3.

Escaping still took place even in double quoted paths which could lead to entries not found, e.g.:

Code: Select all

Org query: "D:\Temp\archive\d&e" *.zip
Modified: "D:\Temp\archive\d^&e" *.zip
So now escaping will only happen if the regex: modifier isn't found and no double quotes are in the query...

Please redownload if you've got the v0.9.3 version
One of my scripts helped you out? Please donate via Paypal

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

Re: Integration of Everything [voidtools]

Post by highend »

v0.9.5 released

This is not a mandatory update.

It adds an entry (always in the last position) of the drop-down field of previously used entries:
<Manage query list>

If you select this a quick edit opens that allows you to modify all existing drop-down entries.
I personally use this to get rid of entries that I do not to intend to use more than once.

The gui will open again if you've used that entry, displaying the new list in the drop-down^^
1.gif
1.gif (62.88 KiB) Viewed 2934 times
One of my scripts helped you out? Please donate via Paypal

NBRU

Re: Integration of Everything [voidtools]

Post by NBRU »

I ran the script "everything_v0.9.5.xys ", the "まとめ.xlsx" file cannot be found,Horst's script is working fine:viewtopic.php?f=7&t=12054&start=165
:?:

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

Re: Integration of Everything [voidtools]

Post by Horst »

I'm using Highend's script since a long time.
If its not working for you but my old simple script works
it looks like the code page is the problem.
My simple script doesn't change the code page before running es.exe.
Highend's script changes the code page to 65001 which is normaly fine and works for me.
You can try to change this in the script to your code page or even remove it.
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

Post Reply