Hi,
Thanks for your support!!
I need rename final name file whitout special charts and spaces in name.
I use Command to send actions finals in workflow:
%comspec% /c "move /y "%s_original_full%" ....
At momente i use AntRename.But i like do in worflow FFAStrans. I dont like save to folder and rename.
How change name whit spaces or special charts, accents... etc. inside FFAStrans.
Thanks!
Rename Special Chars
Re: Rename Special Charts
Hi Taurojo,
maybe this could be a starting point:
you can try it with PopulateVariables-Node and a RegEx-Function:
In the PopulateVariables-Node create a new UserVariable, e.g. SaveWithoutSpecialCchar
Set the new UserVariable to RegEx-Function
This should extract a to z / A to Z AND Digits 0 to 9 from the filename.
In the DeliveryNode you drop originalName and set SaveWithoutSpecialCchar as prefix.
just my 2cent...
regards
Thomas
maybe this could be a starting point:
you can try it with PopulateVariables-Node and a RegEx-Function:
Code: Select all
([a-zA-Z\d]*)
Set the new UserVariable to RegEx-Function
Code: Select all
$regext("%s_original_name%","([a-zA-Z\d]*)")
In the DeliveryNode you drop originalName and set SaveWithoutSpecialCchar as prefix.
just my 2cent...
regards
Thomas
Re: Rename Special Charts
@ThomasM yeeey, regex! lovely
using a populate vars processor, you can either use what thomasm said or use the inbuilt function alrep https://www.ffastrans.com/wiki/doku.php ... _and_alrep
using a populate vars processor, you can either use what thomasm said or use the inbuilt function alrep https://www.ffastrans.com/wiki/doku.php ... _and_alrep
emcodem, wrapping since 2009 you got the rhyme?
Re: Rename Special Chars
Hi,
Work perfect for my!!! Add character _ in regex.
Test in: https://regex101.com/
Finaly: $regext("%s_original_name%","([a-zA-Z\d_]*)")
Thanks for all.
Work perfect for my!!! Add character _ in regex.
Test in: https://regex101.com/
Finaly: $regext("%s_original_name%","([a-zA-Z\d_]*)")
Thanks for all.
Re: Rename Special Chars
Hi,
In the end it is not what I needed to be able to rename and have the output be a name suitable for web servers.
For now I am using this function... somewhat long .
If you have any better ideas
In the end it is not what I needed to be able to rename and have the output be a name suitable for web servers.
For now I am using this function... somewhat long .
If you have any better ideas
Code: Select all
$lower($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace("%s_original_name%", "ā","a"), "ţ","t"), "ş","s"), "ḑ","d"), "ḑ","d"), "ầ","a"), "ằ","a"), "ắ","a"), "ư","u"), "ẵ","a"), "ạ","a"), "ơ","o"), "ề","e"), "ồ","o"), "ộ","o"), "ỉ","i"), "ệ","e"), "ậ","a"), "ị","i"), "ả","a"), "ế","e"), "ừ","u"), "‘","_"), "’","_") , "ʼ","_"), "ḩ","h"), " ","_"), "ḩ" ,"h"), "á","a"), "à","a"), "è","e"), "é","e"), "í","i"), "ó","o"), "ú","u"), "ñ","ny"), "à","a"), "è","e"), "ì","i"), "ò","o"), "ù","u"), "ä","a"), "ë","e"), "ï","i"), "ö","o"), "ü","u"), "â","a"), "ê","e"), "î","i"), "ô","o"), "û","u"))
Re: Rename Special Chars
No its good, i like it. Thats more or less excatly what i do in lots of different programs where the customer wants me to replace special chars to some non special char that looks compareable. Unfortunately i am not aware of any ready to use functions for it. The reason might be that the expectation might be different for many parties, e.g. Germans want to translate "ü" to "ue" because ue is officially an alternate writing style for "ü". Others would not care and just translate "ü" to "u" because it looks similar hehe
Let me know if you need to alter this list frequently, in this case i can come up with a special processor for you that eases your life. I imagine it needs a little time to get all the parantheses correctly hehe
Also in 1.2, the populate processor allows you to have as many lines as you wish, this can also bring a better overview to you.
emcodem, wrapping since 2009 you got the rhyme?
Re: Rename Special Chars
No problem whit that script, create do whith Notepad and simple macro
I like it:
I like it:
"Also in 1.2, the populate processor allows you to have as many lines as you wish, this can also bring a better overview to you."