I just started learning UI path and I want to built a robot that extracts all the file names from the folder that exists on network drive and then inserts those names in the excel spreadsheet. I want to do this in modern experience. so for e.g. The folder contains the name like so:
Name DateModified Type Size
ABC 12/12/2026 PDF 1085 KB
CBE 12/16/2024 PDF 626KB
There are around 300 files like this. I want to extract only the name part of the file from this folder and insert the name part in excel spreadsheet so for above e.g. my excel spreadsheet will have:
Name
ABC
CBE
any help with activities and creating this robot will be helpful.
You can use the For Each File in Folder activity (enable Include Subfolders if needed). Inside the loop, use the current file object to get the file name (for example, CurrentFile.Name).
Create a DataTable with a single column called Name and add each file name as a new row inside the loop.
Once the loop is complete, use the Write Range activity to write the DataTable to Excel.
If you are not familiar with these activities yet, I would recommend continuing the learning track first, as it covers these concepts in detail.