Home > Software design >  Visual Studio Code find in specific file type AND path
Visual Studio Code find in specific file type AND path

Time:05-24

How do I global search in Visual Studio Code ( Search: Find in Files --> Ctrl Shift F in Windows ) for just a specific file type (e.g. *.js) AND in a specific path (e.g. ./src/app)?

I have tried using the following in the files to include field:

./src/app, *.js

but the comma separation query retrieves all the occurrences in either the path ./src/app or the file type *.js.

CodePudding user response:

you have to write a glob pattern:

./src/app/**/*.js

Any directory (**) and only the JavaScript (*.js) files

  • Related