Copy folder and paste folder in same path


1.I want to copy folder name as AUG - previous month and paste the folder in same path.
2.The pasted folder to be renamed as current month- SEP

could anyone help me out.


Check as below

Mark as solution if this helps


I used this code. My AUG file is moved and saved as SEP.
I want AUG file remains . To copy folder and rename as SEP


Check as below

Hope this helps you


I would recommend using ‘invoke method’ activity instead of using invoke code (you’d use the same CopyDirectory method)


Hi @Piraisoodan_J

Try using invoke powershell activity too which uses powershell code to copy folder
I tried it and it worked

Nived N
Happy Automation

1 Like

Hi, i have tried this. But in Sep folder is not copying items in AUG. SEP folder is empty

Hi @Piraisoodan_J,

Can you please explain a bit , do you want a copy of AUG Folder to be made as SEP folder and the files which are in AUG folder should be same in the SEP folder ?


yes exactly the same.what you said.

THE Folder AUG to be copied and renamed as SEP and paste in the same path.

ok @Piraisoodan_J,

in that case , if you want dynamic month, you can just, form your aug month path just take out the AUG month by using lastindexof as path comes in like this ‘c\newfolder\AUG’ so using last index of you can take out the month name , when you get the month name just increment it by 1 using globalization.cultureinfo package, then use create a directory activity in it pass the main path + the month created. the directory will be created . For the files uses Directory.getfiles in AUG folder in a for each loop and as soon as you get a file using copy file activity just copy it to the newly created SEP folder.

Thats it.



let me know if that helped for you

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