Hi Willy, thanks for your patient On string:
hGetFileClient.Get(User.Home & "/Test/test") I get error message: "Wanted String[] got string instead" Thanks Willy Raets wrote: > > Try this: > > Dim sSourcePath, sCopyPath As String > sSourcePath = "http://mydomain/test" > sCopyPath = User.Home & "/Test" > If Not(Exist(sCopyPath) Then > MKDIR sCopyPath > Endif > sCopyPath = sCopyPath & "/test" > If Exist(sCopyPath) Then > KILL sCopyPath > Endif > DownloadFile(sSourcePath) > > > PUBLIC SUB DownloadFile(sURL AS String) > > hGetFileClient.URL = sURL > hGetFileClient.TimeOut = 5 > hGetFileClient.Async = TRUE > hGetFileClient.Get(User.Home & "/Test/test") > > END > > PUBLIC SUB hGetFileClient_Error() > > hGetFileClient.Stop() > > END > > PUBLIC SUB hGetFileClient_Finished() > > hGetFileClient.Stop() > > END > > > > On ma, 2012-03-26 at 14:25 -0700, abbat wrote: >> I have a file on: >> www.mydomain.com/test >> >> I tried : >> >> >> sSourcePath = "http://mydomain" >> sCopyPath = User.Home & "/Test/" >> Copy sSourcePath & "test" To sCopyPath & "test" >> >> but "File or Directory does not exist" >> >> How to download a file? >> Thanks > > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/How-to-download-a-file--tp33544764p33701637.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user