You are not logged in.
Pages: 1
Hello,
I need your help with the following:
I have several files where the file name is in this text example ‘aaaabbbbcccc’ and I want to rename them to ‘aaaa bbbb, cccc’.
What kind of rule can I make?
EDIT:
For example, convert "BeachPiriapolisUruguay.jpg" to "Beach Piriapolis, Uruguay.jpg".
Last edited by den4b (2024-10-04 10:28)
Offline
Hello,
Try RegEx rule:
1) Regular Expressions: Replace expression "^((.)\2+)((.)\4+)((.)\6+)$" with "$1 $3, $5" (skip extension)
From:
aaaabbbbcccc
aabbcc
abc
aabbc
aabcc
abbcc
aaaabbbbccccdddd
To:
aaaa bbbb, cccc
aa bb, cc
abc
aabbc
aabcc
abbcc
aaaabbbbccccdddd
- it is applied only for 3 repeated groups of characters as per given example
- filenames with non repeated characters of 3 groups should be ignored
Please provide feedback if it works as expected.
P.S. Please write more descriptive topic name next time.
TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!
Offline
Hello,
Didn´t work or I don´t know how to do.
This is the file name and what I want.
Can you try for me?
BeachPiriapolisUruguay.jpg to Beach Piriapolis, Uruguay.jpg
Thank you
Last edited by Carlos_1959 (2024-10-03 16:44)
Offline
Hard to work out what you want from the first post.
From your example filename, this should work as long as there are three words and they start with a capital letter.
Add rule, choose 'Regular Expressions'.
Add the following :
Expression : ^([A-Z][^A-Z]*)([A-Z][^A-Z]*)([A-Z][^A-Z]*)$
Replace : $1 $2, $3
Case-sensitive : make sure its ticked.
Skip extension : make sure its ticked.
Save rule.
Offline
It worked. Thank you
And I apologise for not explaining correctly what I wanted in my first post.
Offline
It's worth noting that there is a built-in option in the Clean Up rule to "Insert a space in front of capitalized letters (e.g. CamelCase)".
This option will add spaces between words, but it won't insert a comma after the 2nd word, so it's not a complete solution.
Offline
It's worth noting that there is a built-in option in the Clean Up rule to "Insert a space in front of capitalized letters (e.g. CamelCase)".
This option will add spaces between words, but it won't insert a comma after the 2nd word, so it's not a complete solution.
Thank you
Offline
Pages: 1