Move a folder which is created daily. Folder has current date as the name which to be moved to another folder

I am new to RPA and i’m trying to automate a process where i need to copy a folder that has current date (dd-MM-yyyy) from one directory to another folder that has the name of the current month (ex. december 2018), Now i need to copy this folder everyday; like folder 21-12-2018 to December 2018 then tomorrow 22-12-2018 to December again, but 01-01-2019 folder to be copied to January 2019. In brief both the destination and source folder paths are dynamic.
Please help me out with the logical workflow…
Thanks in advance :slight_smile:

I will give you an overview of logic and how to implement, as you said folder name contains current date so you can simply check the folder by using folderpath.contains(“dd-MM-yyyy”)) method to get Boolean value, if it returns “true” then you can move that file to desired path simply specifying the end folder name using the following pattern.

Note : 1) To get all the directories you can use getdirectories function and you can iterate through all the directories to check desired folder.
2)you can specify destination path as follow
"C:\Users\sample\Desktop" +“MMMM yyyy”)

Hope this helps to solve your problem.


Hello @Mujgule.D

I have created a sample flow but destination folder should not exits. I’m trying to figure out how to achieve it when destination folder already exits. Will let you know about it once I fix it. Meanwhile please check attached project file and let me know in case of any queries.

For Invoke method please check collections in properties for sourcepath and (9.8 KB)

1 Like

hi @Mujgule.D,
below is the logic to move the directories. you have take care of checking if the directory exists in source folder, etc…
you can use invoke method to execute the MoveDirectory method and give the parameters as shown below:
**Assuming that you have to move today’s date folder to current month folder…

1 Like

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