Downloading folders of yesterday's Date

Hello Everyone iam working on a new process of CDSL & NDSL

Someone please help me with this simple task usually bot will login on a website with a given credentials and once bot logged in to website.It will download the yesterday’s date 3 folders

So can someone please help me how can i download yesterday’s date 3 folders?

Hi @Priyesh_Shetty1

you might be looping through all the folders inside the folder, so you can place an if condition
and check their Last Modified Time,

Can you also share like what are the folder names?
and 3 folders? you just need top 3 from yesterday, something like that?

Thanks

CVLKRA,CAMS,KARVY this are the 3 folders name @adiijaiin but afterlogin to website there are many folders available in website the folders name are like this 18062023 16062023
so i want to download yesterday’s date folder and inside that folder CVLKRA,CAMS,KARVY this folders i want to download

@adiijaiin so the main task is to download yesterday’s date folder

Can you simply put a loop
and an if condition inside it

folder.name.equals(Now.AddDays(-1).toString(“ddMMyyyy”))

that way you’ll get the folder name. and then the downloading logic would be through your UI Interactions if its on a web application

@adiijaiin should i use assign activity and store that folder’s name in array and then i have to pass that in for each right and after that i have to use if inside that?

You are getting inputs from the website right, the list of folders, can you share a screenshot?

Olá!

Você pode usar a atividade for each para cada data, por exemplo para dia em um array (18,17,16) você obtém o dia, concatena com o mês e o ano se for necessário e programa os passos que você precisa fazer para baixar os arquivos.

@adiijaiin Now.AddDays(-1).toString(“ddMMyyyy”) in this code it is only downloading the year 2023
it should type whole date
example of yesterday’s date-19062023 like this

This expression will give you yesterday’s date in your specified format.

Thanks

@Priyesh_Shetty1

First identify the selector for the folder which contains innertext which has the folder name in it…

Then use variable in that and increment the idx value to get eqch folder

Eg: <webctrl tag='DIV' innertext='{{RequiredDate}} idx='{{index}}' />

Index can be the property of the for loop …and assign variable…and to check how many are there use check appstate and if condition inside loop and when check app state is true downlod folder else break the loop

And requireddate = Now.Adddays(-1).ToString("MMddyyyy")

Cheers