Want to copy previous month folder and place same location with current month -1 folder name

Hi, Team. I want to copy the (current month’s-2) folder, including subfolders, and then copy the same location but rename with the (current month’s-1 )name.

eg


Here, I need to copy the apr folder from the apr folder, which contains several files and subfolders, and rename it with the (current month.-1)
like output: May 24 (including all files and subfolders)

Hi @Anish_Kumar2

Use Copy Folder activity

current month’s-2 use below

Now.AddMonths(-2).ToString(“MMM yy”)

current month’s-1

Now.AddMonths(-1).ToString(“MMM yy”)

image

Regards,

@Anish_Kumar2

Your file path should be like this

From:

\\10.33.105.155\RPA_Bot\Development Files\Day7ReportsConsolidation\Reference Files\Now.AddMonths(-2).ToString(“MMM yy”)

To:

\\10.33.105.155\RPA_Bot\Development Files\Day7ReportsConsolidation\Reference Files\Now.AddMonths(-1).ToString(“MMM yy”)

Regards,

I Tried This thing I got exception aslo attached SS for your reference

str_PreviousFolder_path : “C:\Users\AKumar03\Downloads\Day_7Process\Apr 24”
str_Inputpath: “C:\Users\AKumar03\Downloads\Day_7Process”

actually I copy input files on my local machine

@Anish_Kumar2

How about the following?

Regards,