time taken to transfer data from one text to another

Hi,
I have a project where every hour data is transferred from one text file to another. The amount of data to be transferred is about 100kB and this seems to take about 10 mins - this seems quite slow to me given that I can upload the data to an ftp server (which is almost the same process) in less than 30 secs.

The code I am using to do the transfer is essentially:

tempFile=SD.open("temp.txt");
dataFile=SD.open(dateString, FILE_WRITE);   //dateString is date txt file eg 17-22-03.txt

while (tempFile.avialable()) {
   dataFile.write(tempFile.read());
}

tempFile.close();
dataFile.close();

Any ideas about what I am doing wrong here?

Any help is much appreciated.

Cheers.

Are you using the SDFat library?

katesfb:
I have a project where every hour data is transferred from one text file to another.

Why would you do a task like that on a slow Arduino?

...R

You can read more than one byte at a time. You can write more than one byte at a time. Doing so will significantly speed up the process.