How to find folder in VS Code?

Viewed 35250

I have a project with a lot of files and folders. There are no problems with finding files. They can be found with Ctrl-P. But there are many folders in which files with the same name are made. Therefore, it is easier to search for a file by the name of the folder in which it is located. How in VS Code to search for folders in the current open project?

For example, I have the following project structure:

A/
    main.js
B/
    main.js
...
Z/
    main.js

The file main.js from the folder P will be easier to find by the folder name.

6 Answers

Ctrl + Shift + E

and start typing. You'll see your search on the top right corner of file explorer.

By default it does not filter by result but your focus will jumps to the first one. From there you can Enter to open it.

If you want to show only results containing the string of search : click on filter icon next to your search (state will be remembered).

Echap

to exit/remove search or

Ctrl + Shift + E

again to switch back focus to last place you were typing.

You can simply select a folder on the explorer and tape some filter keywords. enter image description here

I found a way to search through subfolders. Click on a folder you wish to search, than / and start typing for a name of subfolder

It's simple. Just open the parent folder of your folder in VSCode. Then right-click on the folder you want to find subfolder in and choose "Find in folder"

Related