Rename file issue

Good day,

when I use the “rename file” activity I face this issue:

“Rename File: The source file does not exist.”

I am using a “for each file in folder” activity, and inside it i am using an " else if" activity to detect files and rename them if they meet the condition of the “else if”,

before the “else if” I’m using a " message" activity to display the “current file”, and I see that the file is detected, however, the file is not named and I get this error message: “Rename File: The source file does not exist.”

I know that the file exist and placed in the “current file” variable and is detected be the “else if”, why is the “rename file” activity is not able to see the file?

Hie @Abdulaziz check with the debug mode and use log messages i"m sure the issue is with the folder name you are providing … can you share the screeshot so we can see the source location and also the error to help you to resolve your Query…
cheers Happy Automation

Hi @Abdulaziz

Could you share your flow. Then we are able to understand what you did

unfortunately I am not able to upload screenshots to the forum, so here is a link to the picture in google drive:

Hi @Abdulaziz

The image displays a file renaming dialog box where a file named "Name" is being renamed to "FRACAS Investigation report.xlsx" with the option to keep the extension checked. (Captioned by AI)

In Rename File activity give CurrentFile.ToString and No need to give extension check the Keep extension check box.

A user interface dialog for renaming a file, with fields for the current file, new name, and an option to keep the file extension checked. (Captioned by AI)

Regards,

Hey @Abdulaziz


you are not providing the extension this cause creating the error to rename the file activity enable the extension by marking this.
cheers Happy Automation

In the Rename File activity, instead of providing the file name in the File field, you should use CurrentFile.ToString. This way, the full path of the file will be used when renaming it… @Abdulaziz

Hope you understand!!

worked, thank you so much

1 Like

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