Excluding folders from being indexed not working with CLI

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

Excluding folders from being indexed not working with CLI

Post by defc »

I am using the following script -

src of index.cmd

Code: Select all

set excludeFolders="dev;scrapbook;tmp"
set excludeFiles="*.tmp;thumbs.db;*.bak"

start everything64.exe -nodb -instance Catalog -create-file-list external_drive.efu f:\ -create-file-list-exclude-files %excludeFiles% -create-file-list-exclude-folders %excludeFolders%
which I use to index to an external usb drive, that is on f:. I want to exclude the above folders, but the options are not working. After I run this command I can see in perfmon there is disk access and indexing for the entire disk, and it takes a long time since there are a lot of small files, which is why I want to exclude them.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Excluding folders from being indexed not working with CLI

Post by NotNull »

Does this work for you with the following command-line options?

Code: Select all

-create-file-list-exclude-folders  "\**dev";"**\scrapbook";"**\tmp"
-create-file-list-exclude-files *.tmp;thumbs.db;*.bak
-create-file-list   "external_drive.efu" F:\
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Excluding folders from being indexed not working with CLI

Post by void »

Everything will recursively scan all folders.
Folders matching your exclude filter are not scanned.

Scanning a folder will find all child files/folders.
This is the slow part.

Setting a file filter will not help performance.
A file filter will simply exclude files from your EFU output, they are still scanned.

For the best performance, exclude as many folders as possible.



The following worked as expected for me:

Code: Select all

set excludeFolders="dev;scrapbook;tmp"
set excludeFiles="*.tmp;thumbs.db;*.bak"

start everything64.exe -create-file-list external_drive.efu f:\ -create-file-list-exclude-files %excludeFiles% -create-file-list-exclude-folders %excludeFolders%
(dev, scrapbook and tmp folders were never scanned)

-no-db and -instance are ignored when using -create-file-list
-create-file-list does not create an Everything instance.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Excluding folders from being indexed not working with CLI

Post by therube »

(Since we're here, I'll just babble... note...)

-create-file-list-* slashes are not ambidextrous, always ;-).

Code: Select all

WORKS:  -create-file-list-exclude-folders c:\out\100000
	-create-file-list-exclude-folders c:\out\100000\
	-create-file-list-exclude-folders c:\out\100000/
	-create-file-list-exclude-folders 100000
	-create-file-list-exclude-folders c:\out\100000;222
	-create-file-list-exclude-folders c:\out\100000;c:\out\222

FAILS:  -create-file-list-exclude-folders c:/out/100000
	-create-file-list-exclude-folders c:\out/100000/
	-create-file-list-exclude-folders c:\out\100000;\222\
	-create-file-list-exclude-folders 100001;222
Oh don't hold me (too much) to the above (see that 100001, don't know if it's just a typo or if I did enter 100001 [which would be wrong]). In any case, there are quirks here. In general, seems interim / are OK - except at the beginning of the final path part, but then are also OK if used as a final closing path part (/100000 vs /100000/ vs \100000/ ...).

So in this case, you ought to normalize slashes - to back slashes (sucks ;-), heh).
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

Re: Excluding folders from being indexed not working with CLI

Post by defc »

void wrote: Wed Mar 13, 2024 5:56 am Everything will recursively scan all folders.
Folders matching your exclude filter are not scanned.

Scanning a folder will find all child files/folders.
This is the slow part.

Setting a file filter will not help performance.
A file filter will simply exclude files from your EFU output, they are still scanned.

For the best performance, exclude as many folders as possible.



The following worked as expected for me:

Code: Select all

set excludeFolders="dev;scrapbook;tmp"
set excludeFiles="*.tmp;thumbs.db;*.bak"

start everything64.exe -create-file-list external_drive.efu f:\ -create-file-list-exclude-files %excludeFiles% -create-file-list-exclude-folders %excludeFolders%
(dev, scrapbook and tmp folders were never scanned)

-no-db and -instance are ignored when using -create-file-list
-create-file-list does not create an Everything instance.
Thanks to everyone for the replies and sorry for my late reply here.

@void, isn't that the same command I have? When I run, I see those folders being scanned (read access in perfmon).
@NotNull, you suggest using '**\dev' or ''\**dev' ? isn't that a file glob pattern that will also match any folder with dev in its name or in any subfolder?

Also qn for @void, is the disk label now getting indexed and can I have a column for it? in Windows external drives can get mapped to same drive letter, so its hard to tell. I use your excellent app as a disk catalog and search too.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Excluding folders from being indexed not working with CLI

Post by therube »

external drives can get mapped to same drive letter
Specifically set a drive letter to specific (external) drives.
And if set to a high enough letter (such that letter collisions aren't apt to occur), the drive letter will (essentially) be static.

(Alternatively, USBDLM - USB Drive Letter Manager for Windows.)
defc
Posts: 15
Joined: Fri May 29, 2020 9:31 pm

Re: Excluding folders from being indexed not working with CLI

Post by defc »

therube wrote: Wed Mar 20, 2024 6:42 pm
external drives can get mapped to same drive letter
Specifically set a drive letter to specific (external) drives.
And if set to a high enough letter (such that letter collisions aren't apt to occur), the drive letter will (essentially) be static.

(Alternatively, USBDLM - USB Drive Letter Manager for Windows.)
yes I've done this but a few of the drives are the same. that program you linked looks very useful, thanks. It amazes me how so much of this stuff is still not built into the OS.
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Excluding folders from being indexed not working with CLI

Post by void »

Everything 1.5.0.1372a adds support for forward slashes (/) in -create-file-list-exclude-folders
Post Reply