Copy directory to another directory




Can you help me guys, I want to copy a directory to another directory.

I have a directory “C:\Users\username\Desktop\Data” so this directory have a folder and subfolders and files within it.
What I want to copy this to another directory like “C:\Users\username\Documents\Data”, so I want to copy all the data from this folder to another but if the folder/file is existing it won’t copy the file but if there’s folder existing folder/subfolder on the destination directory it will create the folder and copy the files.



I am not clear what you want, my understanding is you want to replicate, you may have to use recursive logic for that.


If you want to copy the file only then see this link How to copy excel file to other folder?



Try this post,


Thanks guys to all your reply but I already found a solution

I use Invoke Code activity and have this code