For benefit of lurkers and searchers (including me when in a senior moment I forget how I solved it ) :
ftpsetfolder() unnecessary. Prepend the folder name to the third param
(changing param name from lcfile to lctarget)
lctarget = "/CharlesTest/"+lcfile
(Unix server - case sensitive - notice forward slashes )
>I'm using wwClient50 (6/3/2009). I have ftpsendfile working fine, but now I want to send to a particular subfolder on the FTP server and I'm not sure where the ftpsetdirectory fits in the process.
>
>
>*this is code I added trying to first connect, then change the directory
>*lconnect returns 0 and lsetfolder returns .T.
>
> lconnect = this.oftp.ftpconnect(lcftpserver,lcusername,lcpassword)
> lsetfolder = this.oftp.ftpsetdirectory("/CharlesTest")
>
>
> lcFile = Justfname(Trim(lofile.cfilename))
>
>* this is the original code and it still just puts the file in the / root of the FTP server.
>
> lnResult = this.oftp.FTPSendFile(lcFTPServer,;
> lcfilepath,;
> lcFile,;
> lcUsername,;
> lcpassword )
>
>
>I have a feeling I am creating a new handle with the FTPSendfile and the ftpsetdirectory is not being honored for this one, but I don't see where to change the directory within the FTPSendfile, or how to send the file after I make the first connection and change the directory without another login.
>
>Any suggestions much appreciated.
Charles Hankey
Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy
Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.
-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin
Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.