Edit file name, create folders, and move the file to the folder

Hello, I am new to UiPath Studio. I am working on an automation process where the filename is edited to add the current date and month. Also, a current year folder is created if it doesn’t exist. Similarly, a current month subfolder is created inside the year folder if it doesn’t exist. The edited file is saved inside the respective current month subfolder. I am having trouble figuring it out, and I greatly appreciate any recommendation.

Hi @anon14718500,

Welcome to the community :slight_smile:

Firstly, you have planned you steps out which is great. You need to define the logic steps now.
So lets start with the folder problem.

You need to check if the current year folder exists or not, you can use the Path Exists activity (set to Folder). If it doesn’t exist, then use create directory activity.

Same thing for month folder also.

Once the folder structure is sorted, you can then focus on saving the files down to that folder.

To update the file name -take the filename as a string and then add date.now.tostring(“ddMM”)

For the full file path, you will need can use Path.Combine(FolderPath,FileName)


Thank you, @TimK for the warm welcome and clarification. Would you please share your screenshots/process?