How can I include only some subfolders in indexing?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Phate01
Posts: 2
Joined: Tue Mar 16, 2021 11:48 am

How can I include only some subfolders in indexing?

Post by Phate01 »

I'm using Everything 1.4.1.1005.
Given the folder structure:

Code: Select all

C:\MyFolder\
C:\MyFolder\Sub1\
C:\MyFolder\Sub2\
C:\MyFolder\Sub3\
I'd like to exclude the folder MyFolder, but include only some of its subfolders, e.g. Sub1 and Sub3, so I can search only from these 2 and not from the whole MyFolder.
How can I do this?
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can I include only some subfolders in indexing?

Post by void »

To set which folders are indexed:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab on the left.
  • Select your C: drive.
  • Change Include only to a semicolon delimited (;) list of folders.
  • For example:
    C:\MyFolder\Sub1;C:\MyFolder\Sub3
  • Click OK.
Phate01
Posts: 2
Joined: Tue Mar 16, 2021 11:48 am

Re: How can I include only some subfolders in indexing?

Post by Phate01 »

Yes but this will index only those subfolders and not the entire C: drive.
My example was not correct, the actual folder structure is like

Code: Select all

C:\Path\To\MyFolder\
C:\Path\To\MyFolder\Sub1\
C:\Path\To\MyFolder\Sub2\
C:\Path\To\MyFolder\Sub3\
I'd like to index everything, and for a specific folder (MyFolder) only some of its subfolders.
void
Developer
Posts: 16678
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can I include only some subfolders in indexing?

Post by void »

You can do this with regex negative look ahead:

Please try the following exclude filter:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab on the left.
  • Select your C: drive.
  • Clear Include only.
  • Click the Exclude tab on the left.
  • Click Add filter....
  • Set the filter to the following and click OK:
    regex:^C:\\Path\\To\\MyFolder\\(?!(Sub1|Sub3)$)
  • Click OK.
This will still find the C:\Path\To\MyFolder folder and files in this folder.
However it will exclude ALL subfolders except Sub1 and Sub3.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: How can I include only some subfolders in indexing?

Post by NotNull »

When indexing, Everything needs the (grand)parent folder structure in it's database.
You basically want to saw a branch of a tree and at the same time a leaf on that branch to be still attached to to tree itself.


Another approach is to create a Filter where the Search: field is defined as follows:

Code: Select all

< !C:\Path\To\MyFolder\ | C:\Path\To\MyFolder\Sub1 | C:\Path\To\MyFolder\Sub2 | C:\Path\To\MyFolder\Sub3 >
Use "" if your foldernames contain spaces.
Post Reply