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:
00985300
Vues:
72
Hi Anatoliy,

Thanks a lot for your response. Here is the problem: the client uploads the files independently, and our program (actually, it's my friend who is having this problem) only downloads the files. So, I think, your suggestion would not work since we don't have control on the uploading process. Do you see the problem? The client is uploading and in the same time the batch file is trying to download the files.



>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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform