用URLDownloadToFile试了一下
WIN10可以,没WIN7,XP不行。
DECLARE LONG URLDownloadToFileA IN Urlmon LONG, STRING@, STRING@, LONG, LONG
DECLARE LONG DeleteUrlCacheEntry IN Wininet STRING@
IF !DIRECTORY("D:\myfolder")
MD D:\myfolder
ENDIF
? DownloadFile("ftp://qxu1649560463:su6683111@121.42.122.244\myfolder\test", "D:\myfolder\test")
? DownloadFile("ftp://qxu1649560463:su6683111@121.42.122.244\myfolder\update.exe", "D:\myfolder\update.exe")
CLEAR DLLS
FUNCTION DownloadFile(cURL, cLocalFileName)
IF URLDownloadToFileA(0, @cURL, @cLocalFileName, 0, 0) == 0
DeleteUrlCacheEntry(@cURL)
RETURN .T.
ENDIF
RETURN .F.
ENDFUNC