"Start Process" To copy folders from Shared location to local

mmanasa2525

New Member
Hi All,

I am having a .bat file which I'm using to copy folders(which in turn has subfolders containing files) from Shared location path to Local drive. While doing this its taking long time as the files sizes are large. These files may change and I cannot give any static wait stage for the task to get completed. Its happening that my process is going to next step even without finishing copying all folders to local, though I gave a wait time of 2-3 minutes - I am using "Start Process" application name as the .bat file.

My Question: Is there any utility which I can use to run the bat file until the process is complete? It should take the time dynamically until all folders are copied successfully
What is the Run Process until End used for? in that also its asking for timespan, in my case it would be dynamic
 

Attachments

  • start process.PNG
    62.6 KB · Views: 53

VJR

Well-Known Member
My Question: Is there any utility which I can use to run the bat file until the process is complete? It should take the time dynamically until all folders are copied successfully
What is the Run Process until End used for? in that also its asking for timespan, in my case it would be dynamic
Hi mmanasa2525,

I do not know of any utility that would do so, but in any case if it is an exe that would have to be run from Blue Prism using the Start Process and may cause the same issue of proceeding further while the exe is running.
May be you can do a websearch for other options like a tool that returns a true or false after running.

The 'Run Process Until Ended' is used to "Run a process and wait until completion or timeout" as mentioned in its Information stage and you can check by using this in your scenario. The timeout parameter shows for "How long to wait for the application to finish. Default is 10 seconds". You can give a longer time in this parameter than what could be the most possible for the batch file to run. So the process will go to the next stage either on completion or if it encounters the timeout. This is necessary to give so that your process doesn't keep infinitely running in the background in case something is going wrong.

You can also think of using a Blue Prism based approach by doing something as mentioned in the responses in this post.
 

mmanasa2525

New Member
[QUOT
Hi mmanasa2525,

I do not know of any utility that would do so, but in any case if it is an exe that would have to be run from Blue Prism using the Start Process and may cause the same issue of proceeding further while the exe is running.
May be you can do a websearch for other options like a tool that returns a true or false after running.

The 'Run Process Until Ended' is used to "Run a process and wait until completion or timeout" as mentioned in its Information stage and you can check by using this in your scenario. The timeout parameter shows for "How long to wait for the application to finish. Default is 10 seconds". You can give a longer time in this parameter than what could be the most possible for the batch file to run. So the process will go to the next stage either on completion or if it encounters the timeout. This is necessary to give so that your process doesn't keep infinitely running in the background in case something is going wrong.

You can also think of using a Blue Prism based approach by doing something as mentioned in the responses in this post.


Hi VJR

I am using simple batch file which will copy Directory - Directory. My worries is if I give LESS wait time after "START PROCESS"this would skip few files and go to next step. If I give MORE time, it may be a dead wait and degrade my performance. So I was wondering how I can efficiently use the wait so that I can wait until all files are moved and then move to next step.

The batfile is used is shown in the attached CopyFolders
Also I gave the bat file location in application not in arguments instead of cmd.exe. ITs working for me though
 

Attachments

  • copyfolders.png
    26.8 KB · Views: 62
  • Start Process syntax.PNG
    53.7 KB · Views: 56

VJR

Well-Known Member
Hi @mmanasa2525,

Probably you missed the meaning of the timeout parameter

So the process will go to the next stage either on completion or if it encounters the timeout.
If you give a very long time and if the bat file completes first then BP will proceed to the next stage so there won't be a dead wait anywhere.
That way of giving the bat file in the first param is also fine.
So you can try the 'Run Process Until Ended' approach.

The other approach I was suggesting is a pure Blue Prism approach without having to rely on external files like bat which needs to be taken care of while migrating from Development to Test to Production environment.
In any case you are having the file names hard coded in the bat file so you can do the same in a BP collection. Along with that you need to add code for finding the file size of a folder and for Copy folder.
It is up to you to choose an approach.
 
Top