Option for a list of folder to exclude/filter from searches

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Option for a list of folder to exclude/filter from searches

Postby Bacchus66 » Sun Oct 02, 2022 3:54 am

It would be nice if we could exclude certain folders from searches.

As an example, I am regularly doing searches on a specific location (such as a single mapped network drive), that has a large number of files. It also has a particular folder that has a number of sub-folders and a large total number of files that only contains auto-generated files. They never need to be renamed since they regularly get regenerated, automatically picking up any name changes that would otherwise be required. That single folder contains over 1/5th of all the files on the disk. That means that a considerable amount of time is wasted on files that will never get renamed.

It would be nice to be able to exclude that directory, and any others i don't need to scan, from searches.

If you've ever used FreeFileSync, the idea is basically the "Filter" option on specific sync settings, though just for folders. Though I wouldn't be opposed to also being able to apply to files. This could mean either being able to set a hard coded location (such as. V:\#recycle), or a wildcard based one (such as *\#recycle), or even both. I definitely would like the ability to filter multiple locations.

I'm ok with this either being saved per saved search file (as in FFS) or as a global option. As either option would make things a little faster for me

Thanks either way for listening,
Peter S
Bacchus66
 
Posts: 14
Joined: Sat Jun 27, 2020 1:02 am

Re: Option for a list of folder to exclude/filter from searches

Postby therube » Mon Oct 03, 2022 4:55 pm

Perhaps...

12:Filters -> Condition

"Condition - Here you can enter a Javascript condition to filter files/folders. If the condition evaluates to 'true' for an object, then that object is included in the file list, otherwise it is not. Using a condition you can include/filter files based on name, date, exif, size, attributes, length, etc."


(Granted, that setting is not saved.
Maybe, I'm not sure offhand, it is saved ? if you Save as a .bru?)


Alternatively, you might use Everything to find & filter your files, & drag the wanted files into BRU.

Everything -> c:/tmp !/don't.include.me

That would find all files in c:/tmp, but exclude any files in any /don't.include.me directory.
therube
 
Posts: 1393
Joined: Mon Jan 18, 2016 6:23 pm

Exlude names below some folder-name

Postby Luuk » Mon Oct 17, 2022 1:00 am

Yes! With therube's suggestion, the Filters(12) needs a "Condition" like... !/\\(Folder1|Folder2)\\/.test(object('folder'))
This to present any names, if they are not somewhere below an exact folder-name of Folder1 or Folder2.
And using the menu "File, Save As " can also save this condition into a .bru settings-file... Nice catch!
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: Option for a list of folder to exclude/filter from searches

Postby Bacchus66 » Sat Oct 29, 2022 11:27 pm

I appreciate your suggestions. The java condition does of course work, but only in a way that does NOT accomplish the intent of the request.

Using a condition such as !/\\(Folder1|Folder2)\\/.test(object('folder')) does exclude any files under a given directory or directory from the results. However that is not the problem my suggestion was asking to solve.

The issue my suggestion was about has to do with the number of files searched. IE slowing down the search when a given sub folder or sub folders that have a large number of files will never contain any files that need to be renamed. Filtering out files from a given folder or set of folders from the results doesn't solve that since they are still included/processed in the search. Even in the possible rare occurrence they might, I could use a search without that filter turned on.

The point is to be able to add a new filter that would exclude a given folder or folders from being searched at all.

As noted in my example, one of the folders in a given drive that I regularly need to do renames in has a large number of auto generated files that therefore never need to be renamed. If there is a change, they just get regenerated.

The problem is not that they show up in the results, since only few ever match the conditions of any given search. The problem is the folder in question being searched at all, since it has 20% or more of the total files on the disk.

Again, i refer to FreeFileSync as an example of a program with this kind of filter.

Thanks again,
Peter S
Bacchus66
 
Posts: 14
Joined: Sat Jun 27, 2020 1:02 am


Return to Suggestions