copying files from a html server

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

copying files from a html server

Post by adventuresofgreg » Thu Mar 31, 2011 7:07 pm

Hi: I'm trying to find the fastest way to COPY a whole whack of ".csv.gz" files from a URL to my hard drive.

I am able to extract the list of the file URL's, but I don't want to read each file into memory, then write it to a new file on my harddrive - that will take too long. Is there a way to simply copy the file?

Thanks!
Greg

Klaus
Posts: 14213
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: copying files from a html server

Post by Klaus » Thu Mar 31, 2011 7:43 pm

Hi Greg,

doesn't "libUrlDownloadToFile" work for you?
This is non-blocking and does not read the whole file into memory like "load" does".


Best

Klaus

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: copying files from a html server

Post by adventuresofgreg » Thu Mar 31, 2011 8:11 pm

yep - works GREAT! thanks.

Post Reply