Select Distinct from Datatable / Move file to folder on condition


#1

Hi Leads
I have a datatable in below format
COMPANY BATCH DOC FILENAME FILELOCATION STATUS
0135 B1 D1 F1 C:\Input\F1.xlsx SUCCESS
0135 B1 D2 F1 C:\Input\F1.xlsx FAIL
0135 B2 D5 F6 C:\Input\F6.xlsx SUCCESS
0135 B3 D3 F8 C:\Input\F8.xlsx FAIL

For each loop if STATUS is SUCCESS move file to a SUCCESS ( C:\SUCCESS) folder and if STATUS is FAIL move file to FAIL folder ( C:\FAIL )

Challenge is if you look at first 2 rows COMPANY ,BATCH, FILENAME, FILELOCATION is same but DOC and STATUS is different . One file had 2 docs and one is SUCCESS and other a FAIL . This scenario file to be placed in FAIL folder

How can i achieve this

Regards