How to search contents of specific folder.


Feel like I must be missing something obvious. When I right click a folder in the left hand navigator and choose “Find in Files” the search dialog that's opened is still searching the entire project. I can change the toggle from “In Project” over to “Directory” but no matter what directory I opened the menu from the Directory value in the search window is always the project root.

Am I missing something here? Basically looking for the same functionality VSCode provides with the “Find in Folder…” menu item.

WebStorm 2023.3.3


Johnw sorry, I cannot reproduce this behavior so far. In the scenario that you described the Directory scope should always be selected automatically. Could you please share a screen recording demonstrating the steps you perform? 

If you have any third-party plugins installed, please try disabling them temporarily (go to IDE Settings | Plugins | ⚙ | Disable all downloaded plugins and then restart the IDE) and let me know if the issue persists.


I have tried disabling all the plugins and restarting everything, the menu action still does not modify the directory.


Johnw do you by chance have the Keep last selected scope option enabled under IDE File | Settings | Advanced Settings, Search scopes in Find, Replace, Rename? If you do, does it help to disable it?


I did, and unchecking that does fix that issue. Though now I'll have to select the correct scope each time. Lesser of two evils though.

Thank you for the help.


Johnw could you please describe the scenario where you still have to set the correct scope every time? Where exactly you invoke the Find in files and what scope you choose then?


Please sign in to leave a comment.