punnipah
(Punnipah)
January 22, 2022, 8:22am
1
Hi,
I would like to Rename Multiple Files at once in UiPath.
-I have File From Download in Website daily
Ex: Name W_D220119.BAY99 //W_D220119.BBL99//W_D220119.CIMB99
The date changes according to the download date.
-I would like to Rename is : W_D220119.BAY.txt//W_D220119.BBL.dat//W_D220119.CIMB.txt
Thank You for Helps.
You can use “For Each File in Folder” activity in UiPath Studio (not Studio X) to access the files. Then “Rename File” activity can be used to rename file name.
Please refer to the screenshot below.
Renamed files (I ran bot twice)
Hi @punnipah ,
Welcome to the community.
You can move the file to same location just mention the new required name. Post renaming you can delete the old file itself in the loop.
Thanks
1 Like
punnipah
(Punnipah)
January 22, 2022, 10:02am
4
This is Result
-I have File From Download in Website daily
Ex: Name W_D220119.BAY99 //W_D220119.BBL99//W_D220119.CIMB99
The date changes according to the download date.
-I would like to Rename is : W_D220119.BAY.txt//W_D220119.BBL.dat//W_D220119.CIMB.txt
Date : The date changes according to the download date.
99 : Delete
Type : .txt
you can store file name in a variable and use the following function to do it
filename.Substring(0,filename.Length-2)+“.txt”
You can try another folder as the previous screenshot showed that your flow ran successfully.
1 Like