#1 2022-12-08 09:43

Lauraq
Member
Registered: 2016-10-02
Posts: 86

all lowercase if a symbol is present?

Hi smile

I'm afraid it's very difficult sad
I have a big list like this:

25FGl34Mcoas (2)
56FttM335Loas
11ShaT44 (3)

you can have all lines in lower case if there is character "(" or ")" to have

25fgl34mcoas (2)
56FttM335Loas
11shat44 (3)

and lines where the symbol character is not present are not touched


many thanks smile

Offline

#2 2022-12-08 11:15

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: all lowercase if a symbol is present?

Not difficult at all for ReNamer.

Use "Select by Mask" --- *(*
All files matching that pattern will be selected. (and only those will be renamed later on)
https://www.den4b.com/wiki/ReNamer:File … ct_submenu


You can also filter at importing time with "Filter settings" --- *(*
All added files (or folders as files) must match specified masks.
https://www.den4b.com/wiki/ReNamer:Filter_settings



 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2022-12-08 14:15

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: all lowercase if a symbol is present?

sorry i must have got confused...i would like all the files that don't contain "(" to be lowercase.
Not that they are excluded from the process but that they are renamed to lowercase
Many thanks smile

Last edited by Lauraq (2022-12-08 14:19)

Offline

#4 2022-12-08 15:47

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: all lowercase if a symbol is present?

>> """all the files that don't contain "(""""


Use "Select by Mask" --- *(*
All files matching that pattern will be selected.
https://www.den4b.com/wiki/ReNamer:File … ct_submenu


Next use "Invert Selection    Ctrl+I"   
Selected files become deselected, and vice versa: Un-selected become selected  (and only those will be renamed later on)
https://www.den4b.com/wiki/ReNamer:File … ct_submenu





 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#5 2022-12-08 18:57

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: all lowercase if a symbol is present?

now is perfect, many thanks smile

a little problem, the option "save as default..." in Filters, I check it but when I reopen the program the checkmark is gone sad

Last edited by Lauraq (2022-12-08 19:13)

Offline

#6 2022-12-09 23:01

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: all lowercase if a symbol is present?

Hi Lauraq,

as I understand the "save as default" option is a one shot option.

You are setting filters how added files and folders are handled. If you are starting a new session these filters are set to (a) default. By selecting this option your filters are stored so that new session will start with exactly this hooks and masks ...

Offline

#7 2022-12-09 23:23

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: all lowercase if a symbol is present?

As an add on to Stefans answer:

If the case rule is only one amongst others, the masks for ReNamer might not be what intended. It that case you would have two runs. One with the rule switched on for one part of files and the other with the rule switched of ...

As the case step is a simplier one (all lower case) there is the option to use a regular expression rule which only changes the names if there is no "(" or ")":

^([^()]+)$
\L$1

This seeks for a string from start "^" to end "$" (would be the whole filename) and captures it with "(...)". The string should consist from at least one "+" character from a character list "[...]". The character list  conatains all charachters except "^" round brackets "()".

If there is any roud bracket in the filename the regular expression would not match and therefor no replacement will be done.

For more details ...

Last edited by jogiwer (2022-12-10 01:15)

Offline

#8 2022-12-10 10:17

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: all lowercase if a symbol is present?

you are very kind but my english is terrible and i find it hard to understand.
Using "Invert Selection Ctrl+I" is the only thing that bores me a bit and I didn't understand if the string ^([^()]+)$
\L$1 is used to avoid this procedure. Would you be kind enough to tell me exactly what I have to do and where I have to put this string?
many thanks

I forgot ... I should always use this function so I would like it to always be active

Last edited by Lauraq (2022-12-10 10:18)

Offline

#9 2022-12-10 13:57

jogiwer
Member
From: Germany
Registered: 2022-11-05
Posts: 66

Re: all lowercase if a symbol is present?

Hi,

just add another rule and choose "Regular Expression":
RegExp Rule
Some description of this rule could be found in the wiki.

As "Expression:" you should enter:

^[^()]+$

and for the field "Replace:" you'll have:

\L$0

... changed it a little for optimization.

In the rest of my post I tried to explain, what these cryptic strings will do big_smile

jogiwer wrote:

This seeks for a string from start "^" to end "$" (would be the whole filename) and captures it with "(...)". The string should consist from at least one "+" character from a character list "[...]". The character list  conatains all charachters except "^" round brackets "()".

If there is any roud bracket in the filename the regular expression would not match and therefor no replacement will be done.

For more details ...

Offline

#10 2022-12-10 20:00

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: all lowercase if a symbol is present?

jogiwer... your solution is FANTASTIC!!! smile

I open a new thread for a similar problem... if you can see it, please smile

Last edited by Lauraq (2022-12-10 20:17)

Offline

Board footer

Powered by FluxBB