How to copy element in Find Children

Hello. I’m having trouble using Find Children. I want to copy the files specified in the Work folder in my D drive to another folder in C drive (test1.txt and I used Find Children to read through the files in the Work folder. But it seems that my selecter is not correct, so when printing items, it is empty. Can someone show me where I’m wrong?

Here is my folder

here is my result

Hey @Akaza

You can do it conventional way.

  1. Assign a variable of type Array of string i.e., (String) and lets name it listFile. Then use following expression System.IO.Directory.getFiles(“Your Path”,“test”)
  2. It’ll pick only those item which contain ‘test’
  3. Inside ForEach use ‘Move File’ activity and pass target path and path that you’ll get from above expression.

I believe that’ll work.


thanks for answering.I tried as you said and it’s reporting an error

Use your array name in foreach…You are using some other variable…It should be name2

1 Like