How to rename and map files in a folder based on excel


I have 17 images in a folder in sequential order like image.1, image.2 upto image.17. Also, I have a excel file with names and other info for those images. I need to map those images rename them with the corresponding names from the excel file.
I sort the images of the folder and the excel in descending order.
But I am not able to map them with each other.
Can anyone suggest how to do it? I am new in RPA. I have uploaded the sequence I tried to map the names.


rename.xaml (11.0 KB)

Hi @Rituparna_Ray

well…I am not quite sure if I get you right…but why don’t you do the mapping in the excel file?

Column1  |  Column2
image1   |  image data1
image2   |  image data2

After that you can import the range as datatable.
With its help and a ForEach loop trough the file objects it should work.

UiPath Ask your Queries - YouTube Join live or check the video

Hi cKsB,

Do you mean instead of map image files from a folder with the data table?
Can you please send me a xaml file? Will be really helpful. I am learning RPA recently.


Hi Vajrang,

Thanks a lot!! I am watching your video. One request can you please record this video?


rename.xaml (11.5 KB)

Check the youtube link to understand the changes i made

Thanks a lot for sending the .xaml file. I will try and let you know if it is working with my situation.

Hi Vajrang,
In my situation names are not properly mapping with the correct images. Some how the process mixing up names with their corresponding images. So, image.1 getting a wrong name and others are too. Which is not right.
I have ordered my original images files in descending in the folder and renamed them like image.1 to image.17. Also, I sorted my excel file with names. Still the issue exists.
Ideally image.1 should be mapped with the first name of the excel file and so on till the image.17 will get the 17th name in the excel.
Can you help me how to solve that?


join with live session we can do it or solve it in live stream[date=2020-09-15 time=22:00:00 timezone=“Asia/Calcutta”]

Can you send me the link? Last time I was only able to see the stream.
Also, I am trying this way to map the names with right image.
This is the latest file. Giving me an error: 'Rename file: Argument ‘newName’ must e a name, and not a relative or absolute path: ‘JAMES,C:\Users\report\OutputImages\Image.1.JPEG’.
RenameOption3.xaml (6.9 KB)

Hello Ray,
In this video I do a lot of stuff with Files (Chapter included) :

1:10 Download the file and Move the latest file to folders
4:30 Rename files with VB commands
6:00 Move files to do Rename
6:55 Delete files
8:15 Delete only PNG files
8:55 Delete all the files except PNG files
9:55 Move files
11:10 Delete files that are older than 2 weeks
14:40 Create a file or folder with dates inside
17:00 Trigger a process when the file is added to a folder
18:45 How to use the files start the process
20:30 Excel Application Scope use files

Cristian Negulescu