Hi @treddfw
Try as below to get the ListDifference using Subtract Items
1) Get Files in folder of Folder1, I stored it into Files1
2) Get Files in folder of Folder2, Stored it into Files2
Now we have the files with the full path, which is always different from Folder1 and Folder2, So for comparision only we need the files Names not the full path
3) Create New List, Let say List1
4) Create New List, Let say List2
5) Now use For Each and give value as %Files1% and the variable is %CurrentItem1%
6) Inside this you can add an action Add item to list
7) Configure Add item to list as %CurrentItem1.Name% into List %List1%
😎 repeat same for the List2 as well
9) Now the two list have the file names only
10) Now you can pass the values of List1 and List2 to Subtract List and you will get the required result



Below are PAD steps, Make sure you change the path of the folders
Folder.GetFiles Folder: $'''D:\\Test1''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files1
Folder.GetFiles Folder: $'''D:\\Test-2''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files2
Variables.CreateNewList List=> List1
Variables.CreateNewList List=> List2
LOOP FOREACH CurrentItem1 IN Files1
Variables.AddItemToList Item: CurrentItem1.Name List: List1
END
LOOP FOREACH CurrentItem2 IN Files2
Variables.AddItemToList Item: CurrentItem2.Name List: List2
END
Variables.SubtractLists FirstList: List1 SecondList: List2 OutputList=> ListDifference2
If you find this reply helpful, please consider giving it a LIKE AND
If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION
Regards,
Srini