I just want to search files in the folder I enter and NOT subfolders. How do I do this?
Why can’t there just be a simple checkbox for this???
How turn off subfolders in "Find in Files..."?
How can I do this? It would be nice to know if someone could explain as I am unable to find any means. Nice editor other wise but this is pretty basic. Most editors have a simple checkbox to include subfolders or not. Thx
I’m new to Sublime Text so there may be some other way to accomplish this (plugin maybe?), but the “Where” field supports a comma separated list of search patterns. When a pattern is prefixed with a ‘-’ it is an exclusion. You can use that to exclude not only file patterns, but also paths.
I want to search the current folder for strings in .log files, but child folders are named by month and also have .log files and I DON’T want to search them and so too much to exclude each child folder. Thx though.
Well, there’s always something like this:
tmartin:dart:~/LogTest> tree
.
|-- month1
| `-- something.log
|-- month2
| |-- day1
| | `-- something.log
| `-- something.log
`-- something.log
3 directories, 4 files
When: Where=/home/tmartin/LogTest
Searching 4 files for "TEXT" (regex, case sensitive)
blah
blah
4 matches across 4 files
When: Where=/home/tmartin/LogTest,-/home/tmartin/LogTest//.log
Searching 1 file for "TEXT" (regex, case sensitive)
blah
blah
1 match in 1 file
Thx Terence!
Not sure why I did not get a notification on your response and so just noticed.
I’m still hoping the developer sees fit to add this near universal feature to every tool and editor I’ve ever used.
To just simply have a checkbox to include or exclude subfolders in the search.
I shall necro this topic because it still seems that there is no way to search in files non-recursively? I have half a dozen folders where I want to find all occurrences of a string but only search specifically the folders that I have added, not their subfolders, and it’s not possible.
For real, a checkbox or something, maybe leading a path with an asterisk to exclude it from being searched recursively, would probably be a tiny yet very helpful change.
Bugs and feature requests are tracked at https://github.com/sublimehq/sublime_text/issues. Requests in forum tend to get burried.
Can you not do it by specifying some Where parameters in Find in Files
Eg
/home/user/Desktop/Largish_Folder/Final Project, *.cpp, *.hpp, *.tpp, -*/fileHelp Test Zone/*, -*/threadTest/*, -*/Other/*, -*/Test for LC/*, -*/FileHander 2nd Test/*
That excludes a lot of subfolders in Final Project/ ie fileHelp Test Zone/, threadTest/, Other Test for LC/ & FileHander 2nd Test/
Just wondering ?
Ps It’s including in the search all .cpp, .hpp and .tpp (it’s a C++ project)
Defining negative file selectors such as -*/
failed on Windows. Was my first idea, too.