Iterate through through files that have duplicates

I have attached an excel workbook with a list of numbers. In my automation i will be choosing files ( Represented by the Numbers in excel file) to download iterating through them from top to bottom. I’m trying to figure out if there is a way that when i iterate through the files it wont choose a duplicate file. it will start from the first file and work its way down. some of the file numbers are duplicates and i cant manipulate the order of the files. Let me know if you have any ideas?
Book1.xlsx (10.0 KB)


You can either use a remove duplicate datatable activity to remove all repeated instances or you can use the path exist activity to see if the file already exists in an IF statement to decide whether it exists or not

You can use below to convert datatable to a non-duplicate List(of String)

DataTable.AsEnumerable().Select(Function(x) x(“ColumnName”).ToString).Distinct().ToList()

and then use for each loop to iterate only non-duplicates.

Sorry i should have explained better, the actual automation is not dealing with a excel file. i just used that as an example of a list of numbers. My automation has me clicking on the first file and once that file opens there will be a number represented by the numbers on the list in excel, i would click that file number and repeat the process. Im trying to figure out how not to click on the same file number as i work my way down the list. if file number 8 is the same as 1 not to click on it, if file number 2 is the same as file number 4 not to click and so on.