hello i am facing an issue regarding file rename. I have a file in a particular folder and after conversion(script converter software) i have to put same file name after conversion i have done till taking the previous file name but now how to change the converted file name with the same previous file name
Hi
Welcome back to uipath community
Did we try with MOVE FILE activity where in the destination property we can mention the file path and file name we want
Cheers @akv
yes i did that i have done all steps but Only rename the converted text file is confusing because every time converted file name is different so help me that
Before converting store the file name of the file first from the filepath we have like this in a assign activity
Str_filename = Path.GetFileName(“filepath_A”)
Now you would have changed the Filename say filepath_B
Again if you want to use the Filename stored in variable str_filename then mention like this In the destination part of move file activity
“Yourfolderpath\”+str_filename.ToString
Cheers @akv
not working
we can do this by Invoke Method
Target Type : Microsoft.visualbasic.filesysytem
Mehtod Name :Rename
in properties panel of Invoke method
Parameters:
In- string – “oldFilename.txt”
In- string – “newFilename.txt”
May I know the issue we were facing
@akv