UiPath.Core.Activities.RenameFileX doesn't update variable with new file name?

SOLVED EDIT: This is expected activity.

I have a File Variable file_AllMetrics with the file name initially File1.pdf. I am renaming using UiPath.Core.Activities.RenameFileX activity to rename File1.pdf to AllMetrics.pdf. But later when I call file_AllMetrics.FullName.ToString it’s returning the name as File1.pdf.

Is there anythign I’m doing wrong with this that will prevent this from working?

Note, when looking in the file folder, the file is getting renamed, just the variable isn’t updating with the updated name. This is an issue as, later, I need to reference this file using File_AllMetrics.OpenRead() and it fails because it can’t find a File1.pdf file.

Appreciate any insights on what I might be doing wrong here!

The error I’m receiving is:
Assign: Could not find file C:\Users\name\Downloads\File1.pdf. Well, yea, that filename no longer exists and the file is now AllMetrics.pdf

As far we can follow your description we would state:

  • there is no reference wiring offered from the activity. Therefore there is no update behaviour on the “old file” variable

Ok, interesting. I guess I just assumed the variable would carry forward. If that’s not the case, how would I go about updating the variable with this new file? (Or creating a new variable to store this new file?)

please let us know some details:

  • selected compatibility: Legacy, Windows?
  • Package Version of: UiPath.System.Activities?

Thanks

UiPath.system.Activites: 23.4.4
Compatability: Not sure what answer you’re looking for? I’m in Modern Design Experience on a Windows 10 machine using Studio 2023.8.0?

Hi @Adam_Eagle

I have tested your scenario

can you please look into this

bottom right corner e.g.
grafik

However the activity is using 2 input arguments (both of DataType: String)
As mentioned: there is no wiriing / referencing, so there is also no bounce back to the origin variable.

A manually tracking of the old-then-changedToNewFileName is suggested.

Oh, duh, sorry.

Yea, VB Windows.

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