SD card file delete function?

Hello,

I am working with the SD card library and I can't figure how to delete a file. I need to purge the file and write a new set of data to it. Can anybody give me a clue on how this may be done. I must be overlooking something.

StanK

Try:
SD.remove("unwanted.txt");

Hello LarryD,

You show a "unwanted.txt" in the parenthesis, I want to delete all data without any reference to it. Will this work for that?

Stan

I need to purge the file

It will delete file unwanted.txt

LarryD,

Thanks, I tried it out and it works. Simple enough, Remove was about the only function I didn't look at, at least as a delete function. I just have to reopen the file again.

StanK