Update Part of a File Name

Hi

I want to automate the following:

  1. Get file Apr-21 from folder 7
  2. Copy the file to folder 8 and rename the file to May-21

Can someone assist? I’ve tried to use the copy file activity, however I am having to manually type in the new file location and name?

Thanks
Amrit

@amrit.karwal - May i ask what would be the file extension??

From a shared drive - S:Drive; 2020-2021; Reporting Month; P7

@amrit.karwal - I was looking for .xlsx or .docx somthing like this.anyway that fine…

From

 "YourFolderPath" + now.AddMonths(-1).tostring("MMM-yy") + ".xlsx"

To

 "YourFolderPath" + now.tostring("MMM-yy") + ".xlsx"

image

Please try something like this…you may need to adjust based on your file name

oh ok, sorry. It’s a xlsx
Great, I will give that a go
Thank You

1 Like

That worked! Thank you

1 Like

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