Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Add Subdirectories option to EVERYTHING

Jun
789
7
Suggestion: EVERYTHING should have an option that works like the FFIND /S option. This can be done now by explicitly giving the path in the EVERYTHING argument, but an option would simplify using this.
 
Recursion (FFIND's /S) is the default. Keep in mind that EVERYTHING is very much unlike FFIND, EVERYTHING does not search for files (FindFirstFile, FindNextFile); it just filters a (big) list. I'm not sure whet EVERYTHING's /P does! To EVERYTHING, these two are the same.

Code:
everything v:\hold\*.txt
everything /p v:\hold\*.txt

They both give *.txt in subdirectories of v:\hold.

Have you got an example in which /P actually does something?

And have you got a (hypothetical) example in which the proposed option would offer much simplification?
 
The following will display all folders on my system that contain the word dbase;
Code:
everything /d /p dbase

Note that the /d restricts the search to only directories.

Joe
 
As an example,
if I am in my E:\Utils folder,
and want to find all .CHM files in the E:\Utils and sub-folders,
I can do either of the following;
Code:
everything e:\utils\*.chm
or
Code:
everything %_cwd\*.chm

What you want to do is have a switch that automatically tells everything to search the current folder,
and all sub-folders,
for example;
Code:
e:\utils>everything /x *.chm

This would make everything /x work the same as FFIND /S.

Is my understanding correct?

Joe
 
Maybe I wasn't clear. I don't want to have to type the current directory. If I have to do that, I'll just use FFIND. I use "FFIND /S" a lot.
I see. I use FFIND a lot also, buy rarely in the current directory.

This may not be well thought-out but a possible solution (for Rex) might be this: if the (any) search pattern does not contain a path (i.e., a '\'), prepend _CWDS to it. That wouldn't require a new switch. I wonder if that could be done with an alias or a BTM.
 
It's a path search:

Code:
everything /p "_test"
for example should list all paths which have a directory with _test (in name).
 
This may not be well thought-out but a possible solution (for Rex) might be this: if the (any) search pattern does not contain a path (i.e., a '\'), prepend _CWDS to it. That wouldn't require a new switch. I wonder if that could be done with an alias or a BTM.
This seems to do it (no guarantees).

Code:
:: ESEARCH.BTM - prepend _CWDS to search specs without a path
:: if /P appears, leave the next parameter alone

setlocal

unset /q args

do while %# GT 0

    iff "%1" == "/P" then
        set args=%args %1 %2
        shift 2
        iterate
    endiff
    
    iff %@index[%1,/] != -1 .or. %@index[%1,\] != -1 then
        set args=%args %1
    else
        set args=%args %[_cwds]%1
    endiff
    
    shift
    
enddo

everything %args
 
The /P switch will show you if your query exists,
in not just the file path,
but the file name.

On my system,
using everything /p,
with a query of dbase,
the results include;
Code:
E:\Windows Kits\10\Include\10.0.19041.0\um\Wsdbase.idl
E:\DOSBox\DATA\DBASE\MUTUAL\wsh.ch

This includes all files if they have dbase in the path name, and/or dbase in the file name.

Using everyting /d/p,
Code:
E:\DOSBox\DATA\DBASE\MUTUAL

Note that only the path name was queried, not the file name.

Joe
 
Using the Everything Command Dialog;
1696177587196.png


Note that "Match path names" adds /P to the Command Line,
and "Directories only" adds /D to the Command Line.

Joe
 
Back
Top
[FOX] Ultimate Translator
Translate