Visual Studio Code Advanced Search Wildcard in Files to Include

So I found that the asterisk (*) works when you put in the files to include field the higher level folder name as the criteria

The format will be higherLevelFolderName*

Example:

Folder Structure:

|-- app
    |-- users
        |-- list.ts|html|css|viewmodel
        |-- form.ts|html|css|viewmodel
    |-- cars
        |-- list.ts|html|css|viewmodel
        |-- form.ts|html|css|viewmodel
        |-- configurator.ts|html|css|viewmodel
    |-- app.component.ts|html|css
    |-- app.module.ts
    |-- user.service.ts
    |-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css

Let's Assume that every ViewModel file has this word/code/string ICustomMatColumn

Search Keyword: ICustomMatColumn

Files to Include: app*

Search Result:

|-- app
    |-- users
        |-- list.ts|viewmodel
        |-- form.ts|viewmodel
    |-- cars
        |-- list.ts|viewmodel
        |-- form.ts|viewmodel
        |-- configurator.ts|viewmodel

But the CONS of this solution is in case your search criteria is present in the other file, it will be included to the search result.


Apparently, the Visual Studio Code supports glob syntax which is really great. To achieve the desired result in the question you just need to do this format

./**/*< partialFileName >

Example

Folder Structure:

|-- app
    |-- users
        |-- list.ts|html|css|viewmodel
        |-- form.ts|html|css|viewmodel
    |-- cars
        |-- list.ts|html|css|viewmodel
        |-- form.ts|html|css|viewmodel
        |-- configurator.ts|html|css|viewmodel
    |-- app.component.ts|html|css
    |-- app.module.ts
    |-- user.service.ts
    |-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css

Let's Assume that every ViewModel file has this word/code/string ICustomMatColumn

Search Keyword: ICustomMatColumn

Files to Include: ./**/*ViewModel.ts

Search Result:

|-- app
    |-- users
        |-- list.ts|viewmodel
        |-- form.ts|viewmodel
    |-- cars
        |-- list.ts|viewmodel
        |-- form.ts|viewmodel
        |-- configurator.ts|viewmodel

It will strictly include only the files with the partialFileName that you entered in the files to include field