Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FTP upload to a specific folder
Message
De
08/08/2010 23:31:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
FTP upload to a specific folder
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01475706
Message ID:
01475706
Vues:
119
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform