Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FTP file download
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00980915
Message ID:
00985311
Vues:
51
I think Robert Abram's class can help us to go in the right direction. Basically, this is a problem in my colleague's previous job, but he still wants to solve it.

>Hi Nadya,
>
>MGET is not exactly an FTP command. This is a command of FTP.EXE utility that triggers a certain routine. I may guess this routine uses raw ftp command LIST (or NLIST) to enumerate files on the remote server. Then it calls RETR for each filename matching the mask.
>
>* * *
>Behind a single file being uploaded to an FTP server there's always a chain of raw FTP commands sent from local computer to the server. For example:
>
>CWD /mydir/
>TYPE I
>PASV
>STOR myfile.txt
>
>For each raw command received, the server shoots a response back to the client:
>
>250 CWD command successful
>200 Type set to I
>227 Entering Passive Mode [999,999,99,999,99,999]
>125 Data connection already open. Transfer starting.
>226 Transfer complete.
>
>Once you get "226 Transfer complete" -- that's a confirmation that your upload completed successfully.
>
>To program this functionality in Visual FoxPro, use FtpCommand along with other WinINet API calls. Another option is using Winsock ActiveX or Winsock API.
>
>* * *
>The InternetWriteFile in WinINet allows writing to an open file on remote server. So you may transfer your local file to an ftp server by small portions.
>
>* * *
>I apologize for that encyclopaedia :), an old piece of code that I should remove long time ago.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform