Jump to content
Macro Express Forums
andrebiedermann

robocopy not detectable anymore

Recommended Posts

I send this topic to the support. Unfortunately i got no answer for many weeks. I'm somewhat dissappointed about this so called "support".
I resent the topic to the support parallel to this here.
Maybe somebody has similar issues and can help:

I have several macros wich check "Wait for Program to Terminate" for "robocopy.exe"
For a while the programm cannot detect running robocopy-instances anymore.
Ir robocopy is running and i try to browse for robocopy in the "Wait for Program to Terminate"-dialogue, robocopy is not listed in the program list too.
Therefore each "Wait for Program to Terminate"-check skips immediately though while robocopy is running.
I guess the cause are recent windows 10 x64 updates.
All current Windows 10 updates are installed on the system.
Regards

 

Share this post


Link to post
Share on other sites

Have you tried running MEP as an administrator?

Why don't you run robocopy from MEP?

Share this post


Link to post
Share on other sites
On 7/24/2017 at 2:07 AM, andrebiedermann said:

I send this topic to the support. Unfortunately i got no answer for many weeks. I'm somewhat dissappointed about this so called "support".

Our developers have been working on this issue. We have fixed it and will be releasing a new version of Macro Express Pro as soon as it passes our QA testing.

Share this post


Link to post
Share on other sites
On 24/07/2017 at 6:07 PM, andrebiedermann said:

I have several macros wich check "Wait for Program to Terminate" for "robocopy.exe"

For a while the programm cannot detect running robocopy-instances anymore.
Ir robocopy is running and i try to browse for robocopy in the "Wait for Program to Terminate"-dialogue, robocopy is not listed in the program list too.
Therefore each "Wait for Program to Terminate"-check skips immediately though while robocopy is running.
I guess the cause are recent windows 10 x64 updates.
All current Windows 10 updates are installed on the system.
Regards

 

This is how I wait until Robocopy has finished running:

Repeat Until %n[1]% Does not Equal "%n[1]%"
  If Not Program "ROBOCOPY.EXE" is running
    Repeat Exit
  End If
  Delay: 30 seconds, without ability to halt
End Repeat

 

Share this post


Link to post
Share on other sites

I still don't understand why one would not create a Robocopy command in MEP. The macro will continue when its complete. 

Share this post


Link to post
Share on other sites
On 02/08/2017 at 11:30 AM, Cory said:

I still don't understand why one would not create a Robocopy command in MEP. The macro will continue when its complete. 

No, the macro continues on immediately without waiting for Robocopy to complete (as it does when running any .exe from within MEP).

Share this post


Link to post
Share on other sites

Really? So if one runs Program Launch and use the Capture Console Output option MEP doesn't wait for the program to finish? I have a hard time believing that. How is it going to return a value if it doesn't wait. Are you sure about this or should I do a test. Maybe a little wager to see if I can get RoboCopy to wait? 

I will say that  most of the time I use "External Script" so I'm not as familiar with the timing on Program Launch. 

Share this post


Link to post
Share on other sites

MEP does wait. I did a test macro like this with a huge file so as to take a significant amount of time. MEP waits for Robocopy before displaying the results. Unfortunately there's a bug here because when launched this way Robocopy never terminates. I've had it running several minutes now in the MEP debugger and Robocopy still appears in my task list despite being done. If I terminate Robocopy MEP displays the results dialog. 

Program Launch: "robocopy.exe" (Normal)
Parameters:  a:\a d:\d
Text Box Display: Result

This should work. I've had command line programs in the past for doing things like downloading web pages and they worked and MEP waited for them to complete before moving ahead. I'll report this as a bug to ISS. 

Share this post


Link to post
Share on other sites

I developed a work around for the Robocopy problem.  As I suggested early on one can use a batch file. I created "RC.bat" and ran it from Program Launch with the option to capture the console output. It works perfectly and MEP waits for it to complete like all console programs will if one chooses the option to capture output. The contents of the batch file can't be more simple. See below. 

robocopy a:\a d:\d

Also you should know that one can pass parameters to a batch file. This way you can create a generic batch file and vary the path or options. Or create a batch file as a string variable in MEP and run it.

As I stated before there is no reason to create loops to detect a program's completion. Use MEP to control the flow. 

Share this post


Link to post
Share on other sites

You might also try other utilities to mirror. Check Rsync. Also RichCopy

Share this post


Link to post
Share on other sites
13 hours ago, Cory said:

Really? So if one runs Program Launch and use the Capture Console Output option MEP doesn't wait for the program to finish? I have a hard time believing that. How is it going to return a value if it doesn't wait. Are you sure about this or should I do a test. Maybe a little wager to see if I can get RoboCopy to wait? 

I will say that  most of the time I use "External Script" so I'm not as familiar with the timing on Program Launch. 

I've never seen the Capture Console Output option before - is it a recent development?

You're right, if this option is selected then ME does indeed wait for the program to complete.

Share this post


Link to post
Share on other sites

Wow. Another rude one. I spent a lot of time on this also.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×