Guys can anyone help me with this I want to rename the folder without mentioning the date and want to replace it with blankspace. What should I use remove or replace. For evey different place.
Could you elaborate the requirement?
As the system does not allows you to create folder with name empty it will be created as default name Newfolder!
Regards
Actually I have them already with me they have the dates on which they were downloaded. so they have different names with diffrent dates.
eg: ‘abc_de_2021-05-07’,’ jkl_zx_2021-08-07’, and I just want torename them as ‘abc_de’ & ‘jkl_zx’
Hi @aditya.bhandwalkar ,
Try to use move file activity to replace file name and move to any particular folder.
If the file name always abc_de then use substring to get the first 6 char and pass it in new file.
Else you can use Regex function to get file name.
Regards,
Arivu
but I have many files and i want to change the name in same directory.
Hi @aditya.bhandwalkar, File rename in same location is not possible may be you can move to different folder and again back to same folder using move file activity.
Regards,
Arivu
Hi @aditya.bhandwalkar ,
Please try below regex
"abc_de_2021-05-07".Substring(0,"abc_de_2021-05-07".Length-(System.Text.RegularExpressions.Regex.Matches("abc_de_2021-05-07","\d{2,2}.(\d{2,2}|[A-Z\s\S]+).\d{2,5}")(0).toString).Length)
Attaching result :
To Rename file : use activity called :Rename file
Attaching screenshot