Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transfer by FTP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01098560
Message ID:
01098795
Vues:
10
Hi Agnes,
First is remote file name, second is local name.

MartinJ
? "--- Sending File to FTP Server"		
IF !sz_ftp.PutFtpFile('testfile.txt','c:\testfile.txt')
   ?sz_ftp.GetErrorCode(.T.)
ENDIF
*ListDir()
? "--- Receiving File to FTP Server"
IF !sz_ftp.GetFtpFile("testfile.txt", 'c:\testfile.new', .T.)
   ?sz_ftp.GetErrorCode(.T.)
ENDIF
>Hi Borislav
> thanks for your help , I have an other question .
>when sending a file this error message appeared :
>
> Error(0) - unknown error message
> Extended error info(0)-200 type set to I
> 200 port command successful
> 500 Filename invalid
>
>What does it mean ? what can I do ?
>Here the programm
>
>
>
>
>  PUBLIC sz_ftp
>
>   * Make it so Foxpro can find our FTP Class
>	SET PROCEDURE TO c:\transfert\prg\ftp.prg ADDITIVE
>
>   * Create a FTP Object
>	sz_ftp = CREATEOBJECT('ftp_service')
>
>	IF sz_ftp.OpenInternet("wd1ssi","sei","62.410.40.70","21")
>	
>		MessageBox("Successful Connection", 64, "FTP Message")
>	
>	   * Display the Inital Directory
>		? "--- Inital Directory"
>		*ListDir()
>		
>	   * Create a Directory called "Dir_Test" on the FTP Server
>		? "--- Creating Directory (Dir_Test)"
>		IF !sz_ftp.CreateFtpDirectory('Dir_Test')
>			?sz_ftp.GetErrorCode(.T.)
>		ENDIF
>	
>		
>	   * Change to that directory
>		? "--- Changing Directory to Dir_Test"
>		IF !sz_ftp.ChangeFtpDirectory('Dir_Test')
>			?sz_ftp.GetErrorCode(.T.)
>		ENDIF
>		
>*!*		    ListDir()
>	 SET default TO  C:\
>	   * Copy up a file to the server
>	   * NOTE: If you get Error #2 Cant Find File.  It couldn't find this
>	   *       TESTFILE.TXT file.
>		? "--- Sending File to FTP Server"		
>		IF !sz_ftp.PutFtpFile('c:\testfile.txt','testfile.txt')
>			?sz_ftp.GetErrorCode(.T.)
>		ENDIF
>		*ListDir()
>		
>			
>	
>		
>		? "--- Receiving File to FTP Server"
>			IF !sz_ftp.GetFtpFile("testfile.txt", "testfile.new", .T.)
>			?sz_ftp.GetErrorCode(.T.)
>		ENDIF
>			*ListDir()
>
>	       * Delete the Files
>		? "--- Removing File Dir.txt to FTP Server"		
>		IF !sz_ftp.DeleteFtpFile("testfile.txt")
>			?sz_ftp.GetErrorCode(.T.)
>		endif	
>
>       * Change back the Original Directory
>			? "--- Changing Directory back on Level"
>			IF !sz_ftp.ChangeFtpDirectory("..")
>				?sz_ftp.GetErrorCode(.T.)
>			ENDIF
>		
>
>       * Remove the Directory From the Server
>			? "--- Removing Directory Dir_Test"
>			IF !sz_ftp.RemoveFtpDirectory("Dir_Test")
>				?sz_ftp.GetErrorCode(.T.)
>		ENDIF
>			
>					
>			sz_ftp.CloseInternet()
>					
>	  ELSE
>	  	MessageBox("No Connection Made", 64, "FTP Message")
>	  	sz_ftp.CloseInternet()
>	  	?sz_ftp.GetErrorCode(.T.)
>	  	
>	 ENDIF
>
>   RETURN
>
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform