Need to remove last characters

Hi all
Need to remove last -202302140900 for all the files as shown in the image
Can some one help?

1 Like

do this
System.text.regularExpressions.Regex.Replace(filename, "(\-[\d]+)", "")

Hey

can you try with the following?
image

Regards

1 Like

Unable to find rename file activity in studio

Hey

please follow this,in your left panel click in the filter icon then activate the show classic
image

can you search in the activities panel?
image

what does it appears?


I can only see this

Hey

Go to design tab → ManagePackages → project dependencies-> Upgrade UiPath.System.Activities

image

Hi @govindreddy_nagireddy ,

If unable to update to the latest version. You could try the same approach using the Move File Activity.

Let us know if you receive any errors.

I tried in the below way unable to save

‘From’ should be the original file path and ‘To’ should be the path with updated name (by applying the split method as you’re doing now).

@govindreddy_nagireddy

In from field use item and in to field use

System.Text.RegularExpressions.Regex.Replace(item,"-\d{12}","")

Cheers

The below error I am getting

@govindreddy_nagireddy ,

Change the type argument of For Each Activity to String and Check it it works.

1 Like

@govindreddy_nagireddy

I guess you need not change the type argument to string in your for loop properties

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.