Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to filter files by name in vs code?

Is there a way to filter files by name in VS Code? The search icon in the left nav pane provides the ability to do a global text search within the directory context but I haven't seen a way offhand to search for specific files. For example, let's say I want to search for "Chart.component.tsx" or find all test files in the project by searching for ".test.tsx". Is there any way to go about doing this in VS Code?

like image 945
react0r Avatar asked Oct 21 '25 19:10

react0r


2 Answers

Type ctrl-P then start typing the file name. VSCode will search the directories for you.

like image 109
Tim Roberts Avatar answered Oct 24 '25 09:10

Tim Roberts


You can highlight or limit the files that match a find on file name in the Explorer using:

Advanced tree navigation

With the Filter button you can limit the files shown that match.

The Filter button has a new look compared to the documentation and they have added a Fuzzy Match option.

like image 25
rioV8 Avatar answered Oct 24 '25 09:10

rioV8