MultiBot Logic

I have a scenario where I have to copy files from Share-drive to local and process data

How to work this scenario in multibot, because if the files is copying by 1 bot the same scenario is covered by another bot…

Any logic to overcome this?

Hi @Sweety_Girl

Have you tried adding a condition to check whether the file is already available in the local drive before the final copy action? If we can handle a scenario where you will copy if the file don’t exist, and if file exist, skip to the next…

Did that help?


The next process after copying to input-folder is to move files to the another folder…

In cause of multibot… if the files has moved to another folder … The another bot will copy the same files in the input-folder and move… How to overcome in this situation

fine we can do one
thing if the bot1 has moved the file from folder1 to folder2 and while bot2 is searching for the file in folder1 we can try with a path exists
–like make the bot2 to look for the file in the folder1 path using path exists and if the file exists it will access that file or if its not there it will check for folder2 path…
so the steps involved in bot2 are
–path exists with folder1 path and get the output with a variable of type boolean
–if condition pass the above boolean variable as input
–and if the above condition passes it will go to THEN part where we can access the folder1 file path or if it fails the bot2 will go for the ELSE part where we can again use a path exists and mention the folder2 path as input and get the boolean variable as output
–now still being in the ELSE part, next to the path exists activity use a if condition and check for the path exists
if true will go for THEN part and we can access the file in folder2 path
or will go to ELSE part where we can mention like the file is not there with a write line activity

hope this would help you
kindly correct me if i m wrong with the question
Cheers @Sweety_Girl


Just another thing to note is that a line of code or activity may take a few milliseconds, like .02 seconds (I can’t remember exactly). But, if 2 bots hit that time at the same time, and check if File or Path exists, then they both try to move the file at the same time. Also, if the file is in use, it will fail to move.

So, you might consider using “ContinueOnError” to True, Or a Retry Scope that checks if File or Path exists so it keeps trying to move the file for an amount of time until the file does not exist.



Case: Copy the input file from sharedrive to local folder1
After completing copying
then move the input from local folder1 to local folder 2

How to work this scenario in multibot, because if the files is copied from sharedrive to local folder1… the same scenario is covered by another bot…

You can utilize your bots this way just to avoid issues-
Bot1 will copy files from sharedrive to local folder1 and bot2 will move files from local folder1 to local folder2.