Re: Trying to PutFiles to a remote site - WeOnlyDo Discussion board

Re: Trying to PutFiles to a remote site (General questions)

by scot styer, Monday, April 25, 2011, 14:41 (4772 days ago) @ scot styer

I even changed the code, to do a separate putfile
for each file that exists, in the directory
at the end of the loop
the Done event seems to be firing, with the error of component busy

connected event
int i
string spath, spath2
If ErrorCode <> 0 Then
messagebox('error','stop')
return
end if
p_state = 1
messagebox('error','before send')
if p_state = 1 then
for i = 1 to lb_1.totalitems()
spath = c: est2 + lb_1.text(i)
spath2 = /sstyer/ + lb_1.text(i)
messagebox('error',spath)
ole_1.object.putfile(spath,spath2)
next
p_state = 5
end if


done event
if errorcode <> 0 then
messagebox('ERROR',errortext)
close(parent)
return
end if
messagebox('error','in done')
if p_state = 5 then
messagebox('error','pstate 5')
ole_1.object.disconnect(true)
messagebox('Completed','Completed Sending')
close(parent)
return
end if

Actually... I am getting an error in looperror
30003 - loop error component busy
It stops after sending the first file
could it be trying to execute the disconnect before
sending all the files?

Scot,


Your code looks fine. You can call PutFiles inside Connected Event. Do you received some error maybe in LoopError Event?

More help for LoopError Event you can find here:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLX-LoopError-Event.html

Let us know how it goes.


Drazen


Complete thread: