Repacing Text in Filename

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Repacing Text in Filename Thu Jan 24, 2019 3:12 am • by nobsi
Hi,

I have different files in a folder, e.g.:

this_is_a_file_with_underscore_6.22.pdf
test_file_e_322.11.pdf

I want to replace:
1.) all "_" with " "
2.) The last value "6.22" -> "6,22" or "322.11" -> "322,11"

Do you have any hints for me how to achieve that?

Best Regards,
Richard
nobsi
 
Posts: 6
Joined: Wed Jan 25, 2017 4:59 am

Re: Repacing Text in Filename Thu Jan 24, 2019 1:18 pm • by Mr_Noodle
You can try using the replace text function. Not sure if you want to replace all periods with commas, but if you want to make sure to only replace ones in numbers, you'd have to use a match pattern. You can match the part before and after the dot and store those in custom attributes. In a Rename action, you can then recombine them but with a comma instead.
Mr_Noodle
Site Admin
 
Posts: 11230
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Repacing Text in Filename Sun Jan 27, 2019 2:21 pm • by nobsi
Thank you for the hint! Regards
nobsi
 
Posts: 6
Joined: Wed Jan 25, 2017 4:59 am


Return to Support