How to rename excel/files?

image
This is my last month file.
I want to rename it to ZA01 07.2023 - Draft

Hi @Muhamad_Izwan_Bin_Hamran

You can use rename file activity to rename the file.

Check the below image for better understanding.
image

In the file field pass the path of the file.
In the New name field give the new name of the file in double quotes.
Check the keep extension option to keep the extension of file as .xlsx.

Hope it helps!!

Hi @Muhamad_Izwan_Bin_Hamran

Use rename file activity.

Use rename file activity

image

Regards,

Use below expression in Invoke Code activity. FileSystem.Rename(“oldFilePath”,“newFilePath”)

Use rename file activity

Hi @Muhamad_Izwan_Bin_Hamran ,
image
Regards,
LNV

how to like generally tell the system to be automated rename file every month?

Hi @Muhamad_Izwan_Bin_Hamran ,
You need schedule the robot to run monthly to rename file
Regards,
LNV

You can trigger the particular project in the Orchestrator.
In the first date of every month the project trigger and changes the name of the file automatically.

For this you have to publish the project to the Orchestrator.

Hope you understand!!

what i mean is, i still run the RPA manually monthly basis just my requirement is i want the RPA capture rename the file from ZA01 (previousmonth) - Draft to ZA01 (currentmonth) - Draft

Hi @Muhamad_Izwan_Bin_Hamran

Now.Date.ToString("MM.yyyy")

what is the function of assign ?

Assign activity is used to assign the values to the variables.

Hope you understand!! @Muhamad_Izwan_Bin_Hamran

Understand.

Is it my flow is correct ? bcs I want to rename files from folder that i want

When i run the process, seems like it cannot detect the folder and excel files that i want to rename

This was the not best practice to rename the file. If you want to take each file from the folder. Use for each file in folder activity.

Elaborate the process that you want to do then we will give the solution for it.

You are using the Use application\browser activity which is not the good process.

Hope you understand!! @Muhamad_Izwan_Bin_Hamran


I already using FOR EACH FILE IN FOLDER function for moving all files from previous month to current month. Can it merged rename files somewhere around here ?


This is all files that i moved from previous month and I actually wanted to rename the first one only ZA01 06.2023 - Draft to ZA01 07.2023.

Another point is, I also wanted to use rename function every month. eg