Create folders according to hierarchy

Hi All,

I need to Create folders according to hierarchy.
e.g. Announcements-> BM Intimation → Boarding Meeting Notices
I have pdf files inside the Boarding Meeting Notices ,
->download files
->create folders according to given hierarchy
->move files into folder
Please refer the image and help me out.

Thanks,
Ayushi

Try this

  1. Use If conditions with
Not File.exist("YourDirectory\Announcements\BM Intimation\Boarding Meeting Notices "+DateTime.Now.Tostring("yyyy")+"-"+DateTime.Now.AddYears(1).ToString("yyyy"))
  1. It will check if the folder exists in that directory, If not exist, Then place Create folder activity
    image
"YourDirectory\Announcements\BM Intimation\Boarding Meeting Notices "+DateTime.Now.Tostring("yyyy")+"-"+DateTime.Now.AddYears(1).ToString("yyyy")
  1. After the If condition
    Place Move file activity
    image
    Choose from and To the directory
    From- the file downloaded place
    To- the file need to move- “YourDirectory\Announcements\BM Intimation\Boarding Meeting Notices “+DateTime.Now.Tostring(“yyyy”)+”-”+DateTime.Now.AddYears(1).ToString(“yyyy”)

Hi @Gokul_Jayakumar ,

All the folders and hierarchy are dynamic.
If any new data is added, bot needs to fetch that as well.
Please help.
Thanks

@_Ayushi_Jain From the above Folder name, there is a condition to create folder "current year- next year "
Likewise can create for the Current date.

Kindly tell us how your folder was dynamic based on its condition. Where did new data added and in which format?

@Gokul_Jayakumar

I need to extract name of folders according to hierachy from web page.
e.g. After clicking “+” symbol on announcements, BM Intimation is there

“Announcements” and other folder names might change in future
→ if any pdf files are present, i need to download and move into folder
->Hierarchy is dynamic, sometimes we get 2-3 subfolders and then pdf are present

@_Ayushi_Jain
From my understanding, You have to create the folder as per the webpage hierarchy. am I correct?

Use get text activity of each folder name from webpages and stored in different variables.

and join as Vaiable1+"\"+Vaiable2+"\"+Vaiable3