SD Card - Erase versus Format

I have a SD card with a some stored data file on it. DataLog.txt

This file has a short life time - meaning once I have used the contents I don't need the file and the contents can be deleted. This will leave the file empty ready for filling in next set of data for processing. And each set of data will be of different size.

  1. I can open the DataLog.txt for Write and then simply close it. This should empty the contents.

  2. I can format the SD card and write the DataLog.txt fresh every time.

Question is which of the above method will result in a longer life of the card or there is no difference between both. ( I know formatting takes long but that's not an issue right now )

  1. I can write every new set of data to a DateTime stamped file name and once the SD card is filled up, format the card and start from beginning. This should provide a kind of wear levelling and would be the preferred method ? ( Longest life of SD card ??)

Last : There are times when I do an Erase alone subsequent Write fails. But formatting always works fine for writes. Is it a card problem ??

( Sorry - have I asked too many questions ?? :slight_smile:

Is there no remove function?