Matching files (with different extensions like .pdf & .docx) only by name (excluding extension) from two different folders, and moving the matched and unmatched files to separate folders

I am very new to RPA and don’t have any coding experience as well. I have started learning UiPath since a couple of months.

I got a Test Case. I need your help in solving it.

2 Folders - “PDF Files” & “Word Files” have files with their relevant dot-extensions (.pdf &.docx), some files with matching names, and some with non-matching names. [For eg: A1.pdf & A1.docx, A2.pdf & A2.docx, B1.pdf, B2.docx, C1.pdf, C2.docx etc.).

Test Case :-
Find the matching PDF & WORD files (by name, excluding extension) from the folders “PDF Files” & “Word Files”.
If matching filenames found, move those PDF and WORD files to a ‘Completed’ folder (create if does not exist).
Move the unmatched files to an ‘Exception’ folder (create if does not exist).

Also create a report in excel which shows the matching PDF and WORD files as well as exceptions. (Report has 4 Columns, For eg :-

Sl #, PDF File Name, Word File Name, Result
1, A1.pdf, A1.docx, Matched
2, A2.pdf, A2.docx, Matched
3, B1.pdf, , Not Matched
4, , B2.docx, Not Matched
5, C1.pdf, , Not Matched
6, , C2.docx, Not Matched

Note :-
Follow UiPath Standard for coding.
Handle Errors (Expected/Unexpected).
Thinking from end user perspective keep the necessary values in configuration file.


The following post might help you.


1 Like

Thanks a lot @Yoichi , this solved a part of the problem. Now i understood how i can move the matching files from the B Folder as well, and can also move the non-matching files from A & B to another folder as well.

But can you help me to create an excel report which would update the file names (Both matching & non-matching) and their status (Matching / Non-matching).


I modified the sample which is linked from my previous post as the following
Hope this helps you. (17.1 KB)



This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.