Renameing a file with SdFat

I mistyped when I asked this question regarding RTClib. That would be quite a trick

I need to rename a file on SD card after it is detected and used to configure the device. I see no way to directly rename a file. Perhaps copy to a new name and delete the old one, but I see nothing to use to copy either. Two files open at once for a byte by byte copy seems like a bad idea.

Any suggestions?

Thanks,

JAC

You can read more than one byte at a time. Given that SdFat is not a full-blown file system, copy and delete seems to be the only way to accomplish what you want to do.

Can one have more than a single file open at a once, or is it an open-seek-read-close ---- open/append-write-close dance?

Not a big deal really, just seems kind of grubby. Everything else in SdFat works like a champ.

Thanks,

JAC

Can one have more than a single file open at a once, or is it an open-seek-read-close ---- open/append-write-close dance?

You'll let us know when you try, right?

A buffer-full at a time works fine. It took less time to do it than to complain about it

jac

Excellent. If you make a function out of it, it becomes re-usable. You might even post the function here, for others that want to do something similar.