Just out of curiosity I had to try to benchmark this.
It's pretty slow, but unless you're using massive files it should be reasonable.
In Win 7 it copies at 3mbps (44mb in 14sec)
In Android 2.3 it copies at 0.56Mbps (44mb/78sec)
In contrast, copying or moving a file in Windows 7 of this size is nearly instantaneous for me. On Android 2.3 it copies at ~ 2.5-3.0mbps.
How big is this 10k line file you have?
I'd also like to see even this method speed up.
t0 = GetMilliseconds()
fileToCopy$ = "chalk pastel foxglove.png"
newFile$ = "foxglove copy.png"
bsize = CopyFile(fileToCopy$ , newFile$)
t# = (GetMilliseconds() - t0) / 1000.0
mb# = bsize / 1024.0^2
mbps# = mb# / t#
do
PrintC("Time = "):PrintC(t#):Print("sec")
PrintC("Size = "):PrintC(mb#):Print("mb")
PrintC("Rate = "):PrintC(mbps#):Print("mb/s")
Sync()
loop
END
function CopyFile(sOriginalFileName$ , sNewFileName$)
fid1 = OpenToRead(sOriginalFileName$)
fid2 = OpenToWrite(sNewFileName$ , 0)
repeat
WriteByte( fid2, ReadByte(fid1) )
inc iTotalBytes
until FileEOF(fid1) = 1
CloseFile(fid1) : CloseFile(fid2)
endfunction iTotalBytes