How to copy a folder?



I have to copy a folder and then paste it in another location. Can anyone help me with this?


@apriyam use send hotkey activity


use start process activity and point out cmd.exe


this example for Delete a directory. you can change the command as per your need


You can try this:

  1. Store the path of files in array of string.
    string FileArr = Directory.GetFiles(filePath); //use assign activity
  2. For each fileValue in FileArr
    Use copy activity with inputs as source - fileValue and target - targetPath.

This will copy all the files from one folder to another.


Hi palindrome,

Does copy file work with folders as well?

I am facing an problem when I point the full path of the folder as source, it gives an Access Denied. While, when giving the full path of a file, on same location, it successfully copies the file.


hi ddrdushy1,
could you kindly suggest what strategy to use to check if command execution is successful?



based on the command it vary. i usually use while loop after command prompt.something like this.



Check out the workflow posted by ‘Suchi3190’, it works perfectly fine