Duplicate files in folder

I’m relatively new to Uipath on working on a workflow where I need to check for duplicate files in a folder.
I haven’t got another folder to compare the files to, just want to make sure there are no duplicate files in a folder.
If there are we probably need to terminate the workflow for now. I’ve tried outputting the file names into a data table, but kind of lost of how to search for duplicate files in there.

Anybody suggestion would be greatly appreciated.

Hi @Aliz_Szabo

Welcome to UiPath Forum Community

A folder does not contain duplicate file names until they have different extensions. So you want to check for files with the same name that have different extensions, right?

Could you explain in more detail with example.

1 Like

Morning, @kumar.varun2

Yes so the process I’m working on using a set of template notepad files. The template files should be in the input folder but we want to make sure we have the right ones in there. So I’ve counted the files (230 notepad files and 1 excel).
The bot will amend or replace these files in the process later on but for now we want to make sure there are no duplicates in the folder as part of validations at the beginning of the process.

If there was 2 files with the same name it could technically say COPY as part of the filename. Would you recommend to search for copies instead of looking for duplicates?

Thanks :slight_smile:

share the screenshot of the folder containing duplicate files

is it like
file1 copy.txt
Or is it going to be
file1 (1)

Please provide the proper input

Sorry having some IT issues today.
Yes you are right I can’t have duplicates in there as if I copy the same file in folder 2x the original name will stay the same eg: filename.txt but the second one will say filename-copy.txt

So I just need to check if the file name contain -copy to find duplicate ones right?


I had tried many softwares in the past, but the one that worked for me the best is DuplicateFiles Deleter.

This should delete all the files that have “- Copy” in them: