Re: select every nth file(s) after every z file count

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

Re: select every nth file(s) after every z file count

Postby Admin » Thu Feb 04, 2021 12:01 am

Deleted please resubmit with a new user name. thanks
Admin
Site Admin
 
Posts: 2059
Joined: Tue Mar 08, 2005 8:39 pm

Re: select every nth file(s) after every z file count

Postby wtfiwinomgs » Thu Feb 04, 2021 4:19 pm

Admin wrote:Deleted please resubmit with a new user name. thanks


thank you, I re registered now back.

so is it possible with BRU to do this?
wtfiwinomgs
 
Posts: 3
Joined: Thu Feb 04, 2021 4:08 pm

Re: select every nth file(s) after every z file count

Postby Luuk » Fri Feb 05, 2021 7:44 am

Greetings, Im glad the email is now removed, because many spammers always coming here, and maybe you can never have peace again! Im always reporting them, but never do they stop keep coming back, with more counterfeit posts and always having more spam.

The Volume II manual has similiar example page 1276, so if z=25, the Numbering(10) settings can be ...
Mode=Prefix, Start=1, Pad=2, Break=1, Sep.=--, Type==Base26. This making 01-- start every 1st-file, and 0P-- starting every 25th-file.

Then using Filters(12) for the selections. Like if n=7-16 to select every 7th-16 files, the "Mask" can be ^0[7-9A-G]--.*
Then putting checkmark in "RegEx" and clicking the blue arrows to present only the files starting like "07--" through "0G--" for every 7th-16 files.

This the only way Im knowing to make the selections easy, is after first renaming them inside the Numbering(10). So then after the selections, if needing to unrename them all, you must first to click "Reset", then using this "Match" and "Replace" inside the RegEx(1) like...
^0[\dA-P]--(.+)
\1
Luuk
 
Posts: 325
Joined: Fri Feb 21, 2020 10:58 pm

Re: select every nth file(s) after every z file count

Postby wtfiwinomgs » Sat Feb 06, 2021 3:26 am

Luuk wrote:Greetings, Im glad the email is now removed, because many spammers always coming here, and maybe you can never have peace again! Im always reporting them, but never do they stop keep coming back, with more counterfeit posts and always having more spam.

The Volume II manual has similiar example page 1276, so if z=25, the Numbering(10) settings can be ...
Mode=Prefix, Start=1, Pad=2, Break=1, Sep.=--, Type==Base26. This making 01-- start every 1st-file, and 0P-- starting every 25th-file.

Then using Filters(12) for the selections. Like if n=7-16 to select every 7th-16 files, the "Mask" can be ^0[7-9A-G]--.*
Then putting checkmark in "RegEx" and clicking the blue arrows to present only the files starting like "07--" through "0G--" for every 7th-16 files.

This the only way Im knowing to make the selections easy, is after first renaming them inside the Numbering(10). So then after the selections, if needing to unrename them all, you must first to click "Reset", then using this "Match" and "Replace" inside the RegEx(1) like...
^0[\dA-P]--(.+)
\1


hey thank you for the detailed response. as expected it is a bit too much of what I can understand, I do use BRU but only very basic level.

if you can help me answer these questions:

1. what does sep., RegEx mean and what do they do?
2. since you mention to use prefix, I have never been able to use filter/selection to select prefixed files for some reason, because I always end the file as .bmp or .jpeg etc so my filter/selection terms used are always *01.bmp or *AE.jpeg etc
3. if prefix filter selection does work, then using your method ^0[7-9A-G]--.* (what does this mean..? ^0[7-9A-G]--.*)

thank you!
wtfiwinomgs
 
Posts: 3
Joined: Thu Feb 04, 2021 4:08 pm

Re: select every nth file(s) after every z file count

Postby wtfiwinomgs » Sat Feb 06, 2021 3:28 am

also to add to above post (couldn't find edit button). I just tried base 26 and it looks like it loops every 25 files which is very nice, didn't know this function existed and I never touch it.

however when checking, it looks like max is base 36. is it possible to have say base 100+?
wtfiwinomgs
 
Posts: 3
Joined: Thu Feb 04, 2021 4:08 pm

Re: select every nth file(s) after every z file count

Postby Luuk » Sat Feb 06, 2021 1:57 pm

Sorry for the poor explanations, the "Sep." abbreviates "Separate", so to separate the numbers away from the original text.
So with Mode=Prefix and Sep=-- makes the names like... "01--filename.txt".
But if Mode=Suffix and Sep=__ makes the names like.... "filename__01.txt"

The "RegEx" abbreviates "RegularExpressions", so can use them both inside RegEx(1) and Filters(12) with the checkmark. Some better explanations here... viewtopic.php?f=3&t=96 but Im also try explaining these ones using here, so making it easier to modify.

The Filters(12) Mask without RegEx can be aa* to list all of the names with prefix "aa".
The trick for me, is learning there can be many masks like aa*.jpg aa*.bmp to list the jpg or bmp files with prefix "aa", and then also like *aa* !*.pdf to list all of the files with "aa" anywhere in the name, except for the pdf files. The only problem when editing Mask, is must remember to either click the blue arrows, or a folder, or to "Refresh Files".

The Filters(12) Mask with RegEx can be ^aa.* to list the names with prefix "aa".
With regex, we need "^" to say "beginning", and ".*" to say "*", and "[a-c]" to say "a" or "b" or "c". So ^0[7-9A-G]--.* is saying 1st-char="0", 2nd-char="7-9 or A-G", and 3rd/4th-char="--". Also instead using something like [a-f], its ok using [abcdef] to say the exact same thing.
Without RegEx, it would have to be very long Mask like... 07--* 08--* 09--* 0A--* 0B--* 0C--* 0D--* 0E--* 0F--* 0G--*.

Yes, the Base100+ is not possible with free versions, but the javascript should conduct this part easily. Its unfortunate, but Im not expert enough to post javascript, because still trying to learn the Perl, but is frustrating. I know there is different methods(x,y) to set the maximum and minimum, but that really is most that Im knowing.

This not means there can be workarounds! Like to select every 2nd-5th from each 40, first to rename like...
Numbering(10) Mode=Prefix, Start=1, Pad=3, Break=1, Sep.=--, Type==Base20
Then the Mask with "RegEx" is ^0[02468ACEGI][2-5]--.* to list the 2nd-5th from each 40.

Since using Base20 (goes all the way to "J"), but needing every 40, we filter the odds inbetween, so matching every 40, instead 20.
Since ^0[0-9A-J][2-5]--.* is listing 2nd-5th of every 20, we change [0-9A-J]-->[02468ACEGI] to destroy the odds matching inbetween.
Hopefully, this enough for you to modify on other examples. But if not, its what the forums can be good for, yes? There is also much Im learning about RegEx in the Volume I and Volume II manuals, if you like to learn them also.
Luuk
 
Posts: 325
Joined: Fri Feb 21, 2020 10:58 pm


Return to BRU Support