Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy files to FTP site
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01040321
Message ID:
01040460
Vues:
13
Hi Todd,

There are several ways of accessing FTP servers from Visual FoxPro.

1) Using Microsoft WinInet library, presented by WinInet.Dll file normally found on any Windows machine. It contains large set of Internet functions, including FTP functions:
FtpCommand
FtpCreateDirectory
FtpDeleteFile
FtpFindFirstFile
FtpGetCurrentDirectory
FtpGetFile
FtpGetFileSize
FtpOpenFile
FtpPutFile
FtpRemoveDirectory
FtpRenameFile
FtpSetCurrentDirectory

This is MSDN link to WinInet library
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/wininet_functions.asp

FoxPro is able to use all these functions. Here is some code samples on http://www.news2news.com/vfp :

FTP Class for Visual FoxPro application

Retrieving complete list of folders and files on an FTP server

Using FtpCommand

Downloading files from the FTP server using InternetReadFile

How to download a file from the FTP server using FtpGetFile

Uploading file to the FTP server using InternetWriteFile

Uploading file to the FTP server using FtpPutFile

Retrieving list of files on the FTP directory

Retrieving the size of a remote file

Deleting a file stored on the FTP server

Creating a directory on the FTP

Removing FTP directory

* * *
2) Using Winsock API library. Wisock calls can be very efficient way to access FTP servers. Normally this library is installed on any Windows computer.

Code sample on http://www.news2news.com/vfp :
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)

3) Using Winsock ActiveX control. Check this link SAMPLE: Use the Winsock ActiveX Control with Visual FoxPro.

4) Using third party controls and libraries, for example the West Wind Client Tools.

6) Using the good old FTP utility -- just type FTP in Windows Start - Run. This utility is able to work in batch mode, sometimes it is good enough.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform