I am trying to move a file from one folder to another. I would simply use the MoveFile activity if the file had the same name all the time - but not only does the process not drop the same file name all the time, i don’t want to limit the code and the process by designating a name for the file.
I tried the code below
Dim sourcepath As String ="C:\PathA\FolderA\"
Dim endpath As String = "\\PathB\FolderB\"
File.Copy (sourcepath, endpath)
File.Delete(sourcepath )
but i’m getting the following error - “Invoke code: Exception has been thrown by the target of an invocation”
My understanding is …you like to sweep one folder always and move the files from that folder to another folder if meets the condition right? If yes what is your condition?
I can help with the array.forach in the invoke code activity…which is just one one code…