Locking a file in multi bot environment

Hi all, need your help, advice, and suggestions. I have a bot that reads JSON file from a set directory every minute and process it. I am planning to add multiple bots for the same process to distribute the load and reduce the overall wait time. I am trying to put a mechanism that will eliminate the possibility of multiple bots picking up the same file. In other words, if a bot already processing a JSON file, other bots should not be able to process it. What would be the best way to handle it?

I was thinking of locking the file until the process is complete - but could not find any UiPath activities. Please help me with your advice and suggestions. Looking forward to hearing from you all. Thanks in advance.

I’d simply rename it and after processing rename it back. Maybe using a queue is a better option.

Thanks, moenk. I never used queue before. Will that require a separate bot - we have limited licenses. Is there a way to lock a file so that other bot can’t process the same file?

As I said - renaming the file when processing it.
From the way you were asking I guess you dont want to start the real thing: