How to check the current time is 12AM or not

Hi All,

Bot will start running the process at 7PM every day , once it is started it will create a folder like “InvalidOutput29122022”(Current day).After creating a folder the will perform web automation (Data scrapping) then it will create 4 excels inside the InvalidOutput29122022 folder"
After 12AM the bot will create another folder like “InvalidOutput30122022” and it will create the 4 excels output.
But I dont want bot to create another folder i.e InvalidOutput30122022, instead the bot should write the data inside the excels i.e first created folder InvalidOutput29122022.
Because Bots will run 12 hours every day i.e from 7PM to 7AM.
so after 12AM bots will create the another(next day folder). I just want bot to write all the excels inside a folder which was created @7PM at the time bot starts.

please do needful and give a logic even the bot created a new folder bot should write the output into excels which folder was created first.

@Gokul001
@ppr
@ushu
@geetishree.rao
@Sudharsan_V
@Nithinkrishna
@lakshman

HI @HeartCatcher

Create a new asset and in the beginning of the process write the folder path in the created asset and read the asset and store the data in a variable.

Now use that variable whenever you try to access that folder by this it will be same whatever the time may be

And at the end of the process change the value in that new created asset to 0.

If you are not using the orchestrator you can implement same in config file or notepad in the project folder

Hope this Helps

Regards
Sudharsan

Hello, @HeartCatcher - To achieve this scenario, bot should remember the folder that was created in the 7PM run. So, after creating a folder in the first run store that folder name InvalidOutput29122022 in a text file(use write text file activity). For every run (until after 12 AM run) try to access the same folder name from the text file