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.
Let>RP_WAIT=1 work with CopyFolder>
Moderators: JRL, Dorian (MJT support)
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Let>RP_WAIT=1 work with CopyFolder>
Hi, no RP_Wait is only for RunProgram.
Re: Let>RP_WAIT=1 work with CopyFolder>
Thats was I thought, but wanted to be sure. Thank you!
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Let>RP_WAIT=1 work with CopyFolder>
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
Re: Let>RP_WAIT=1 work with CopyFolder>
Okay, thank you for doing that test. Gives more confidence that it wont delete while copying.