"Niels Borg" <nb@video-graphic.dk> skrev i en meddelelse
news:3ec24e4e$0$32440$edfadb0f@dread16.news.tele.dk...
> Hej,
>
> Jeg har brug for at kopiere en fil fra et website til min lokale disk.
> Er er nogen der kan hjælpe mig.
>
> Jeg troede man kunne lave en fso.copy
http://website.dk/text.txt til
> c:\text.txt
man kan gøre sådan
Private Declare Function URLDownloadToFile Lib "urlmon" Alias
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal
szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As
Long
Public Function DownloadFile(URL As String, LocalFilename As String) As
Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub Form_Load()
DownloadFile "
http://www.yoursite.com/test.zip", "c:\test.zip"
End Sub
mvh HC