My case
Reports are generated and save in dedicated folder.
Each day between Monday and Friday reports is generated and saved, only weekends are excluded (which means if there is a holiday during a week, raport is also generated)
Now I need to check today if I have a report from previous working day (exclude only Saturday and Sunday)
I need this because Im comparing two reports
This will give you your most recent workday, this does not take into account federal holidays or anything of that sort. For this you could use something like the Nager package to give you holiday information based on country code and add some additional logic to account for it.
NOTE: The prevWorkdayString = prevWorkday.ToString("dd.MM.yyyy"); is where you can actually format the date however you’d like for whatever format the files you’re searching for has it in. Just change the "dd.MM.yyyy" portion, but keep in mind "mm" is minutes and "MM" is months.
All you need to do now it port this code into UiPath using their elements or if you run C# you may be able to use invoke code, not sure though, I’ve never really played around with it, but the logic is laid out.