How to remove brackets from file name .Ihave used below replace activity to remove brackets but still throwing error. I want to remove the brackets from my file name and replace with -

![]()
( ).|/?:
<>/|():.
By using the below regex expression you can remove all the special characters.
[^A-Za-z0-9]
Regards
even this / \ forward and backward slash
same expression shall i use what you gave?
Yes you can use the same expression but after replacing you need to add an . before pdf so use the below syntax in assign activity.
Input = "cvhvds\/.';.!WR^R#E#%@()/\\///\\*&%#*@sdbchsgdvchds.pdf"
Output = System.Text.RegularExpressions.Regex.Replace(Input,"[^A-Za-z0-9]","")
NewFileName = Output.Insert(Output.Length-3,".")
Regards
Its removing the date and spaces .
I want something like this Candour Communications Private Limited India_GGN-23-24-152_27-Oct-23 as the file name.
Now I am getting like CandourCommunicationsPrivateLimitedIndiaGGNOct
This is the file name . I want to remove slashes bracket and any other special characters
Candour Communications Private Limited (India)_GGN/23-24/152_27-Oct-23.pdf
Please use the below regex
Input = "Candour Communications Private Limited (India)_GGN/23-24/152_27-Oct-23.pdf"
Output = System.Text.RegularExpressions.Regex.Replace(Input,"[^A-Za-z0-9 _-]","")
NewFileName = Output.Insert(Output.Length-3,".")
Regards
Thank You
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.


