Ignore folders with numbers

Post any Bulk Rename Command support requirements here. Open to all registered users.

Ignore folders with numbers

Postby plaincarlos » Mon Sep 18, 2023 8:53 pm

Given a list of folder names

Code: Select all
AHWWTPAC05?
WINDOWS?
AHMGCVR014?
ahmgcvr014?
JonesErika?
CarlosMa?
DT00009999?


Regex to exclude/ignore any folders with numbers. Mixed case is OK.

And return only:

Code: Select all
JonesErika?
CarlosMa?
DT00009999?


BRU settings are as follows:
Case(4)=lower
Filters(12) = [A-Z][^0-9][^WINDOWS], regex, subfolders, lvl=2
plaincarlos
 
Posts: 1
Joined: Mon Sep 18, 2023 8:44 pm

Re: Ignore folders with numbers

Postby therube » Tue Sep 19, 2023 4:26 pm

Not quite sure what you're after?

If you want to exclude numbers, why do you want DT00009999? to be returned?

12:Filter
Mask: ^[A-z]+[\.]*[A-z]*$
RegEx: (enable)

Find names that start with a letter, followed by a letter any number of times, followed by a (dot) zero or more times, followed by a letter zero or more times. That finds only letters & dots.

[A-Z][^0-9], ignores lowercase file names, so /mpthreedir/ is found
[A-z][^0-9], also finds lowercase names, so /mpthreedir/ is not found, but /mp3dir/ is still found
What the above says, is to find a letter, not followed by a number.
In /mp3dir/, m is a letter, followed by p - which is not a number, so it fits the rule (RegEx).

That is different from finding only letters (& a possible dot).
therube
 
Posts: 1307
Joined: Mon Jan 18, 2016 6:23 pm

Re: Ignore folders with numbers

Postby therube » Tue Sep 19, 2023 4:46 pm

Oh, BRC, oops.

Hmm...


/NOFILES, would only select directories
/PATTERN, only uses simple wildcards, ? *, & is case sensitive at that
/RECURSIVE, will find subdirectories, but I don't know that there is a way to limit the depth (to 2)?

/REGEXP, deals with renaming, not selecting, so that is not going to help


Not sure BRC is going to be able to do it, the way you're wanting?
You might have to "hardcode" the directory names & perform the same operations on each, separately?

BRC /DIR:JonesErika /RECURSIVE /REPLACECI:Dog:Cat ...
BRC /DIR:CarlosMa /RECURSIVE ...
BRC /DIR:mydocs /RECURSIVE...
therube
 
Posts: 1307
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRC Support