Is it possible, to move all the files in Folder 1 to Folder 2 in one go

Is it possible, to move all the files in Folder 1 to Folder 2 in one go. I tried using Move Activity… but it failed to Move. Please suggest me the best method to achieve this.

1 Like

Yah of course
Use a assign activity like this
Out_filepath = Directory.GetFiles(“yourfolderpath”)

Where Out_filepath is a string array
—now pass this variable to a for each activity and change the type argument as string in the property panel
—inside the loop now use a MOVE FILE ACTIVITY and mention the source property as item (the variable from for each loop) and destination property with vale as string - folder path were you want to move them

This will move one by one but all together finally

Cheers @KavithaManohar

1 Like

You can use a For Each file within the folder (Directory.GetFiles(folder_path) and then use the move activity to transfer it.

No, is it possible to move all files in that folder in one go…without using for each loop?

1 Like


Please use below code

Forum (27.9 KB)


1 Like

Kindly have a view in this
It got a example as well

Please let know for any queries
Cheers @KavithaManohar

Firstly, why do you want to move all of them in one go? Do you need to undo the whole thing even if one of them cannot be moved? All or none? Even if that is the case, there is no way you can do it even manually. Because, correct me if I am wrong, there is no such command at the OS level.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.