Search for files in folders that have a dot in their name - windows-11

1st, I want to cover what this question is not about. There are 100's of articles that talk about how to search for folders with dots within their names. This is not the question. This is about searching for files within a folder that has dots in its name.
Say I have a folder
c:\public\dev\process.ui.help\
I have another folder
c:\public\processuihelp\
I have exact copies of the same files in each folder
help.csproj
help.cs
help.cs has a line in it like
//find this - SearchForMe
if in explorer and I search "SearchForMe", then explorer only returns help.cs from the 2nd folder but not the first. It may be treating the dotted folder names as extensions.
Edit: in the index options, any folders with extensions are automatically being de-selected. If I reselect them and save, they are de-selected again.
Is there any work-around or alternative search?
Why? : In this large development project (10's of projects, 1000's of folders), I am using dotted folder names to organise namespaces without creating a deep hierarchy of folders. Windows allows dotted folder names.

I haven't searched with built-in windows searches for a long time.
I just replicated your situation and tried searching with "Search My Files" and with "Everything", two tools I use frequently and both found both files immediately. Maybe give either or both of them a try and see if they do what you are looking for.
Edit: Everything is by voidtools, search my files by nirsoft, both are freeware.

Related

Android Studio's search scope for files located in certain directories (in particular androidTest)

I have a very big android project and I want to search for all the entries in androidTest for certain lines of code. In this project I have a separate folder with a big amount of modules grouped up in different directories.
I'm trying to write a scope that will show only entries located in folders called androidTest.
The scope, I suppose, is file:*androidTest*/, but it does not find all the entries (does not search through all the files in project)
Did someone entered this problem?
I tried to use file:*androidTest*/ pattern but it definitely does not work properly.

How to search a string in a specific file type in VSCode?

It should be quite simple, but sometimes I found that searches in VSCode do not work as expected.
In this below example, I just want to search the string stat in all the JavaScript files in the folder ./ocean-data-qc/ocean_data_qc_js. But, in the search results, I get files of all kind of types:
I also want to search in the subfolders files.
Am I doing anything wrong?
With the expression ./ocean-data-qc/ocean_data_qc_js,*.js it will search across all the files of the path ./ocean-data-qc/ocean_data_qc_js and then it will search on all the js files of the project. The result will be the union of both searches
Instead, the pattern should be ./ocean-data-qc/ocean_data_qc_js/**/*.js to make just one search in all the js files in the folder and subfolders. But it is not working as expected because the files in the .gitignore are included in the search. So, in some way, the pattern in the include section is overriding the excluded paths.
I have found an issue to answer why the .gitignore is not taken into account in that case. As I am working in multiroot mode, I found two solutions that work:
Just using the root folder of the project where I am searching: ./ocean-data-qc/**/*.js. Like this .gitignore is taken into account.
The other alternative is to use the search.exclude attribute in the VScode settings.
Note: The important sections in the VSCode docs: Multiroot search. Advanced search options

Can I filter sidebar directories by name (in sublime text 3) to quickly find node module, for example?

Here is my example, where I could have some input to filter directory subfolders.
The direct answer to the question is that this is not possible; the list of files and folders in the side bar is controlled by what folders you add and the settings that you include/exclude files and folders from within those folders. In theory you could try to modify the settings to change what appears in the side bar, but every time those settings change the file catalog needs to be rebuilt, which is something that can take some time (particularly in something with a large node_modules folder). It also causes all of the folders in the side bar to fold up.
The expected workflow is more designed around working with files than with working with groups of folders and that workflow centers around the Goto Anything panel. Choosing Goto > Goto Anything in the menu will open a panel showing you a list of every file that is currently contained in the side bar (except binary files).
The panel can filter text via fuzzy matching using as many search terms as you want (in any order you want) and will move the most likely matches closer to the top of the list. It also learns over time what files you pick when you use certain filters.
For your use case here you can open the panel and use a filter like node_modules or nmod/ to filter to files in the node_modules/ directory, acorn/ to see only files that exist in folders that match acorn, or a combination. You can also include fragments of filenames like lodash/ indjs to bring the index.js of the `lodash/ package to the top of the list.
The best way to get a feel for how this works is to play with it a little bit. Note also that the context menu in open files has a Reveal in side bar command that will focus the side bar on that file, which can be a handy way to see the other siblings of files you have open.

Excel 2016 VBA FilePicker - Code to add Folders to Quick Access Group on Navigation Pane

I can't find a way to add links of folders (network ones) to the "Quick Access" group in the Navigation Pane of Excel 2016's File or Folder Picker.
I create a File or Folder Picker in VBA, then I assign the most likely useful starting folder to .InitialFileName of the Picker object, but then there are another two almost as likely folder paths for the user to start with.
All three starting folder options are a pain to browse, hence the need to stick a link for the other two likely paths somewhere (which are not set at .InitialFilename). I could only think of the above described place to have links to the paths.
All help is appreciated...
First I tried to be really clever and judge the most likely path to be used (by the available data at this point of the macro), but all three possible paths are very likely starting points to pick the actual file or folder needed.
Then I went through the Properties of the File and Folder Picker Objects.
I found nothing about customising the Navigation Pane.
I found a way to add entries to Excel Recent Files, but I could only add files to it not folders, and also Recent Files List isn't available in File or Folder Picker.

How to search for files faster in Sublime Text 3

Right now I do ⌘t then scroll through autocomplete, or start typing the name (but half the time it doesn't find it).
Sublime doesn't find a file in many cases. For example, I typically have all my files called index.<ext> nested inside some folder. So I might have:
my/long/directory/structure/index.js
my/long/directory/structure2/index.js
my/long/directory/structure3/index.js
my/long/directory/structure.../index.js
my/long/directory/structuren/index.js
my/long/directory/index.js
my/long/directory2/index.js
my/long/directory.../index.js
my/long/directoryn/index.js
my/long/index.js
my/index.js
...
But in sublime you have to search for an exact path. I can't search this:
my directory index
And get results for directory, directory2, directory..., directoryn, I just get empty results because there is not my/directory. I can't remember the full folder path most of the time, so it takes a lot of effort to do so and I end up just navigating in the sidebar to find the file which takes some time.
Wondering if there is a better/faster way of doing this. Basically searching for a file by snippets/keywords of the complete path. So m dir would return my/long/directory, etc.
The first thing to note is that you do not have to search for an exact path; anywhere that Sublime provides you a list of items to select from and a text entry, fuzzy matching is in play. In your example searching just for idx will narrow down the list to all items that have those characters in that order, even if they're not adjacent to each other.
The entries show you visually how they're matching up, and there's a fairly sophisticated system behind the scenes that decides which characters make the best matches (relative to some hidden scoring algorithm):
In addition to this you can use multiple space separated terms to filter down the list. Each term is applied to the list of items resulting from the prior term, so they don't need to be provided in the same order as they appear in the file names.
This helps with searches where you know generally the name of the file, and from there can further drill down on segments of the path or other terms that will help narrow things down:
Something to note here is that as seen in these images, the folder structure is my/long/directory/structure, but the names of the files as seen in the panel don't include the my/ at the start.
In cases where your project contains only one top level folder, that folder isn't presented in the names of the files. Presumably this is because it's common to every file and thus not going to be a useful filter. As such trying to use my in the search field will return no matches unless one of the files has an m and a y somewhere in their filenames.
This isn't the case if there are multiple top level folders; in that case Sublime will include the root folder in the names of the files presented because now it's required to be able to distinguish between files in the different folders:
In addition to this, note that for any given filter text you enter in a panel, Sublime remembers the full text of the item that you selected while that filter text was being used, and uses that in it's scoring to prioritize the matches the next time you search in the same panel. The next time you search with the same term, Sublime will automatically pre-select the item that you picked last time under the theory that you probably want it again.
The search terms and their matches are saved in the session file and in your project's sublime-workspace files, so as you move from window to window and project to project you're essentially training Sublime how to find the files that you want.
My advice would be to try and flip your thinking a little bit. In my opinion the power of the fuzzy matching algorithm works best when you try to find files in a more organic way than trying to replicate the path entirely.
Instead, I would throw a few characters from the name of the file that I'm trying to find first, and then add another term that filters on some part of the path that will disambiguate things more; a term of idx s1 in this example immediately finds the two index.js files that are contained in structure1 folders, for example.
In a more real world example the names of the folders might contain the names of the components that they're a part of or something else that is providing a logical structure to the code, so you might do idx con to pull the index.js from the controller folder or idx mod to find the one in the model folder, and so on.
Regarding a better/faster way to do this I don't think there is one, at least in the general case. Sublime inherently knows every file that's in your project as a part of indexing all of the files to power other features such as Goto Symbol and it uses file watchers to detect changes to the structure of the open folders.
Anything else, including a third party plugin or package, would need to first do a redundant file scan to accumulate the list of files and would also have to replicate the file watching that Sublime is already doing in order to know when things change.

Resources