Haii All… I Had 2 folders … In Folder 1 I had some files in 2 I had some files… I need to match the files in folder 1&2 ,If files are matched means it will store in folder X else folder Y…
Can anyone help me? how to give condition to matched files that will store In X folder🙏

Get the files list from folder 1 . loop it and check whether it exists in folder 2. Based on the result, paste your file in x or y

@karthick Tq Bro

@karthick Can y explain me clearly

@Nandhuba What did you mean by files matching or not, Should the Filenames ? or is it the content?

Are asking if the file names match? If so, you could get the files from folder 1 and 2 using Directory.GetFiles() which is a .net line of code you can use in an Assign activity. Once you have both those arrays of files, then simply check if the filename is contained in the other array, which you can use some more .net for this.

Here is an example:

Assign activity: files1 = Directory.GetFiles(folder1, "*.pdf").ToArray
Assign activity: files2 = Directory.GetFiles(folder2, "*.pdf").ToArray

For each f1 In files1
  IF activity, condition: files2.Any(Function(f2) Path.GetFilename(f1) = Path.GetFilename(f2) )
    //Store f1 to folderX
    //Store f1 to folderY

or something like that.


1 Like

@supermanPunch filename like me.pdf

@Nandhuba Follow the Steps @ClaytonM mentioned, It is the Solution and it is pretty clear :sweat_smile: , We can make a workflow , if you still didn’t understand it clearly.

@ClaytonM Tq buddy :heart_eyes:

1 Like