Use of Invoke Method

How i can move that folder which contains both json and image files from one directory to another directory? In Uipath
Please help me regarding this issues. Need workflow for this .

Get the files count from the directory (json and image ) and then use move file activity to move to another directory in a loop
or use .net method
Directory.Move(sourceDirectory, destinationDirectory);

Thank You
Can u please provide workflow.

Main.xaml (10.0 KB)

Please check this


Thank’s for this,
But it only copy all the folders to another folder. I want to copy the folder which contains json and image files.

I was struggling how to use InvokeMethod activity to invoke Array.Resize method.
It always failed with error:

‘Array’ does not have a public static method named ‘Resize’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke Method - Array Resize’.

Finally I learned that Array.Resize is a generic static method which require besides Parameters also define GenericTypeArguments

Below picture illustrates the set-up of InvokeMethod for invoking generic static method.





Hope you will find this article helpful :slight_smile:

Sharath Raju


I read article. very helpful. thanks


I have read the article, but i’m still confused about how can i find these methods and what are they and what function can these methods do.

Do you know that?
Thanks in advance.

Great explanation !

just wondering do you understand it now? if not what do u not understand ?