How to move a directory and its files to a new path


I´m trying to move a direcotry with its files to another path using “copy file”, but it doesn´t work. copy file

Move Folder to another Folder
Move directory did not work
Move all subfolders of a folder to another folder

You can create a new folder and use Move File (using foreach)

or you may use

Directory.Move(sourceDir, destinationDir);


Thank you @vvaidya. I want to use the second option, Directory.Move(sourceDir, destinationDir); but I don’t know where I have to put that instruction because it doesn´t return any value


Hi ELanchas.

You can use the activity invoke method, in the Programming -> Execute -> Invoke Method.
Here is another topic that might give you more information on how to use it. Move a file or Rename a file

Note : Using the “move” it moves the file . It’s != copy. Make sure you know what you need.


How to transfer multiple files from one folder to another based on current date

Use below method, please note destination folder should not exist

Move/Delete a directory/folder

Thank you @vvaidya, @Pedro_Pereira,

it works perfectly. Really I want to copy the directory, not move, but it seems that copy method doesn´t exist for Directory.



Folder Copy needs to by done file by file (foreach)


Hi @vvaidya @ELanchas
Could you please share the sample project with us? regarding the folder move !!!



i tryed this methode but it says: Move did not exist in


we can use Copy Directory method of FileSystem. here is the exampleCopyLogs.xaml (7.4 KB)

If destination folder is exist even though it will execute.

How to copy a folder?

Please see following thread, looks similar to me.