revCopyFile

Bob Sneidar bobs at twft.com
Thu Mar 22 19:19:14 EDT 2012


Ohhh... good idea. And a perfect case for try/catch too! ;-)

Bob


On Mar 22, 2012, at 4:11 PM, Maarten Koopmans wrote:

> I scripted this using the read as binary etc. using 16KB buffers some time
> ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
> at hand, but it is really straightforward:
> 
> Open the source file for read binary
> Open the destination file for write binary
> Read 16KB or whatever is left if it's less from the source into a buffer
> Append the buffer to the destination
> Loop until done
> Close the files
> 
> Faster then revCopyFile (in fact, why doesn't itdo it this way....) and no
> hassle with shells or external processes where you need to check if they
> actually did what you asked.
> 
> HTH, Maarten





More information about the Use-livecode mailing list