PutFile using wodsftpdll - WeOnlyDo Discussion board

PutFile using wodsftpdll (wodSFTP / wodSFTP.NET / wodSFTPdll)

by dan, Tuesday, June 21, 2005, 20:12 (7098 days ago)

I have been trying to use the PutFile method in order to put one
our files on a remote server. My login and connection looks good, my remote location is just not seeing the file drop in.
I'm supposed to drop this file at the root of the remote server and my code looks like Sftp_PutFile ( iul_hClient, local_string_path, '')
If you have any suggestions, please let me know.
THanks
Dan

Re: PutFile using wodsftpdll

by wodSupport, Tuesday, June 21, 2005, 20:38 (7098 days ago) @ dan

Dan,

what do you use for remote path? Did you try setting / (slash, not backslash)? Do you set Blocking to True?

Re: PutFile using wodsftpdll

by Dan, Tuesday, June 21, 2005, 20:50 (7098 days ago) @ wodSupport

For remote path I set a string to empty quotes ''. I have not tried Blocking as yet.

Re: PutFile using wodsftpdll

by wodSupport, Tuesday, June 21, 2005, 21:06 (7098 days ago) @ Dan

Dan,

I'm not sure about blocking, depends how you use wodSFTPdll.

But RemotePath must be set - either as 2nd parameters in PutFile, or through RemotePath property. And it must contain full absolute path where you want to upload file - so you cannot leave it empty, or make it relative to something else.

Can you try that?

Re: PutFile using wodsftpdll

by Dan, Tuesday, June 21, 2005, 21:45 (7098 days ago) @ wodSupport

I tried the putfile with a '/' slash as the 2nd param also. This did not work and my code looks like Sftp_PutFile(iul_hClient, local_string_path, '/')

Re: PutFile using wodsftpdll

by wodSupport, Tuesday, June 21, 2005, 21:46 (7098 days ago) @ Dan

Dan,

did you get any errors?

If you use events, did Done event report error?
If you don't use events, did you set Blocking=True, in which case error would be returned immediately from PutFile?

Re: PutFile using wodsftpdll

by Dan, Tuesday, June 21, 2005, 21:51 (7098 days ago) @ wodSupport

I'm not using events, and I did set blocking to True. I will check
my return codes again

Re: PutFile using wodsftpdll

by Dan, Tuesday, June 21, 2005, 22:40 (7098 days ago) @ Dan

Below are the commands I am using in order. The server I am trying to put my file to is a SSH2 type server. Please let me know if my command order looks ok, and if I need to set any secure setting properties. Thanks, Dan

Sftp_Create
Sftp_SetLogin
Sftp_SetPassword
Sftp_SetPort
Sftp_SetHostname
Sftp_SetBlocking
Sftp_Connect

Sftp_PutFile

Sftp_Disconnect
sftp_Destroy

Re: PutFile using wodsftpdll

by wodSupport, Tuesday, June 21, 2005, 22:42 (7098 days ago) @ Dan

Dan,

yes, this is correct. Did you check return code of Sftp_PutFile?

Can you please zip your code and send it to techsupport@weonlydo.com so we can try it out?