I have to copy a folder and then paste it in another location. Can anyone help me with this?
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:
- Store the path of files in array of string.
string FileArr = Directory.GetFiles(filePath); //use assign activity
- 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.
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.
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