wait for ready CopyFile process

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
wil
Junior Coder
Posts: 25
Joined: Mon Dec 06, 2010 6:00 pm

wait for ready CopyFile process

Post by wil » Mon Jan 03, 2011 2:13 am

Hello,

Is it possible to check if CopyFile>[file] process is ready?

thnx and best regards,

wil

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jan 04, 2011 8:33 am

You don't need to. CopyFile will not return until the process is completed.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

wil
Junior Coder
Posts: 25
Joined: Mon Dec 06, 2010 6:00 pm

Post by wil » Tue Jan 04, 2011 6:40 pm

Hello Marcus,

Thank you for your answer.
You are right and i should have known this with a simple test :oops: :

Code: Select all

let>x=0
let>y=
Repeat>x
  let>x=x+1
  ConCat>y,%x%%CRLF%
Until>x=10000
//delete output files first
DeleteFile>%CWD%\10000_lines.txt
DeleteFile>%CWD%\10000_lines_copy.txt
//write 10000 lines to CWD
WriteLn>%CWD%\10000_lines.txt,result,%y%
CopyFile>%CWD%\10000_lines.txt,%CWD%\10000_lines_copy.txt
ReadFile>%CWD%\10000_lines_copy.txt,testvar
//next writelines from testvar to output file
message>testvar
Best regards,

wil

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