Let>RP_WAIT=1 work with CopyFolder>

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
stearno
Junior Coder
Posts: 22
Joined: Sun Jul 26, 2020 4:15 am

Let>RP_WAIT=1 work with CopyFolder>

Post by stearno » Sun Jul 26, 2020 7:38 am

Objective: I am trying to copy the folders over and when its finished delete the folders.

Does "Let>RP_WAIT=1" work with "CopyFolder>", meaning the next command to "DeleteFile" will not start until the copying is finished?

Thanks for the clarification.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Let>RP_WAIT=1 work with CopyFolder>

Post by Dorian (MJT support) » Sun Jul 26, 2020 1:38 pm

Hi, no RP_Wait is only for RunProgram.
Yes, we have a Custom Scripting Service. Message me or go here

stearno
Junior Coder
Posts: 22
Joined: Sun Jul 26, 2020 4:15 am

Re: Let>RP_WAIT=1 work with CopyFolder>

Post by stearno » Sun Jul 26, 2020 2:25 pm

Thats was I thought, but wanted to be sure. Thank you!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Let>RP_WAIT=1 work with CopyFolder>

Post by Dorian (MJT support) » Sun Jul 26, 2020 3:22 pm

I just experimented with this using 10000 files, and (as I expected) the next line does not seem to be executed until CopyFolder has completed. But just for good measure you could always wait for a second after moving, and then only delete the folder if CF_Result = True. You'll need to change the paths, and maybe use 1000 if you don't want to use 10000.

Code: Select all

//Create 10000 text files
let>loopcount=0
Repeat>loopcount
  let>loopcount=loopcount+1
  writeln>d:\11\%loopcount%.txt,,test
Until>loopcount,10000
Wait>1


CopyFolder>d:\11,d:\22
Wait>0.5

If>CF_RESULT=True
  DeleteFolder>d:\11
Endif


//Should be 0
MDL>CF_RESULT_CODE

//Should be True
MDL>CF_RESULT


Yes, we have a Custom Scripting Service. Message me or go here

stearno
Junior Coder
Posts: 22
Joined: Sun Jul 26, 2020 4:15 am

Re: Let>RP_WAIT=1 work with CopyFolder>

Post by stearno » Mon Jul 27, 2020 7:56 am

Okay, thank you for doing that test. Gives more confidence that it wont delete while copying.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts