Loop through folders

Hi, I have to loop through folders but from todays year/month/date. then I have folders named by time where then are files which I have to read. The robot is processing the workflow once a day so I can’t assing varibale with Now.ToString but with function GetDirectories or GetFiles.

image

image

image

Hi @markosc

Let’s assume the year folder is inside this folder “C:\Projects\Data”

We have to append the year, month and date with this folder like,
strText = “C:\Projects\Data” + now.tostring(“yyyy”)+ “” + now.tostring(“MM”) + “” + now.tostring(“dd”) + “”

After that use strMin = directory.getdirectories(strText) will return all the minutes and second folders,

After that use directory.getfiles(strMin) will return all the files inside the minutes and second folder

Thank you so much!

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