|
Home > Archive > dBASE Questions and Answers > August 2005 > Download a file from a server
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Download a file from a server
|
|
| Roberto Portalone 2005-08-25, 7:24 am |
| I need to insert the code in my program to be able to download a file (for automatic patch & upgrade).
Actually from dUFLP I use OpenURL(http://www.mysite.org/patch.zip), but in this way I'm not able to specify where (the directory) to download.
Can anyone suggest me a better way ?
Regards
Roberto
| |
| Marc VdB 2005-08-25, 7:24 am |
| Hi Roberto,
> I need to insert the code in my program to be able to download a file (for
automatic patch & upgrade).
> Actually from dUFLP I use OpenURL(http://www.mysite.org/patch.zip), but in
this way I'm not able to specify where (the directory) to download.
You could use the downloadprogressbar. Look at my site (www.vdblogic.de/dbl)
under Freeware...
HTH,
Marc
--
www.vdblogic.de/dbl
------
| |
| Christian K 2005-08-25, 9:24 am |
| Could use URLMon.dll, which is a windows file, <%systemroot>\System32
EXTERN culong URLDownloadToFile(cp
tr,cstring,cstring,;
culong,culong) URLMON.DLL from "URLDownloadToFileA"
nResult = URLDownloadToFile(nu
ll,cURL,cFilePathToS
ave,null,null)
if nResult <> 0
msgbox("Error")
endif
If I remember correctly, I did run into an odd glitch once where the
returned result was zero (success), but the file didn't get created, so
you may want to check for the existence of your file.
Roberto Portalone wrote:
> I need to insert the code in my program to be able to download a file
> (for automatic patch & upgrade). Actually from dUFLP I use
> OpenURL(http://www.mysite.org/patch.zip), but in this way I'm not
> able to specify where (the directory) to download.
>
> Can anyone suggest me a better way ?
>
> Regards
> Roberto
|
|
|
|
|