Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FtpGetFile()
Message
From
07/02/2006 10:40:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01094124
Message ID:
01094277
Views:
46
Put these lines first
#define FTP_TRANSFER_TYPE_ASCII 1
#DEFINE FILE_ATTRIBUTE_NORMAL         128
>Anatoliy,
>if i try this then i get an error "variable FTP_TRANSFER_TYPE_ASCII not found". this is my problem with the code, i don't get the error if i enter 0 instead but the code still does not get the file:(
>Slán
>~M
>
>>This works for me:
>>
>>DECLARE INTEGER FtpGetFile IN wininet;
>>	INTEGER hFtpSession, STRING lpszRemoteFile,;
>>	STRING lpszNewFile, INTEGER fFailIfExists,;
>>	INTEGER dwFlagsAndAttributes,;
>>	INTEGER dwFlags, INTEGER dwContext
>>
>>lpszRemoteFile = "somefile.txt"
>>lpszNewFile = "c:\Temp\somefile.txt"
>>fFailIfExists = 0 && do not stop if the target already exists
>>dwContext = 0
>>
>>lnResult = FtpGetFile(hFtpSession, lpszRemoteFile, lpszNewFile,;
>>	fFailIfExists, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_ASCII,;
>>	dwContext)
>>
>>
>>Complete code (requires membership):
>>How to download a file from the FTP server using FtpGetFile
>>http://www.news2news.com/vfp/?example=43&function=66
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform