Experimentalist
Well-known member
SdFat - Concise code to delete all files from a folder / directory
Hi
I am still struggling really to understand best practices when using the C language and I am looking for a concise way to perform the equivalent of the DOS cmd "Del *.mac" (Sorry I work entirely in the MS Windows environment) using the SdFat library http://code.google.com/p/sdfatlib/. At the moment all my files are stored in the root of the SD card, though I will shortly be looking to organise them into folders.
Up until now the easiest option for me has been to reformat my SD card when reprogramming my T3 since all the files are encrypted using keys stored on the EEPROM that are wiped out on re-programming. I now wish to retain some files so formatting is not the best option. The main reason for the change is that I am using a TFT LCD with the UTFT library http://henningkarlsen.com/electronics/library.php?id=52 and I use a lot of icons and graphics which I have started to serialise and de-serailise from the SD card to save memory
I wholly admit to being overwhelmed by pure C / C++ programming and come from a self taught .Net VB (originally) and C# (more recently) background. I am truly a novice programmer on a steep learning curve.
Any advice anyone can offer on the concise and correct way to achieve my aim is much appreciated
Ex.
p.s. I am sorry for those that find the question tedious :0)
Hi
I am still struggling really to understand best practices when using the C language and I am looking for a concise way to perform the equivalent of the DOS cmd "Del *.mac" (Sorry I work entirely in the MS Windows environment) using the SdFat library http://code.google.com/p/sdfatlib/. At the moment all my files are stored in the root of the SD card, though I will shortly be looking to organise them into folders.
Up until now the easiest option for me has been to reformat my SD card when reprogramming my T3 since all the files are encrypted using keys stored on the EEPROM that are wiped out on re-programming. I now wish to retain some files so formatting is not the best option. The main reason for the change is that I am using a TFT LCD with the UTFT library http://henningkarlsen.com/electronics/library.php?id=52 and I use a lot of icons and graphics which I have started to serialise and de-serailise from the SD card to save memory
I wholly admit to being overwhelmed by pure C / C++ programming and come from a self taught .Net VB (originally) and C# (more recently) background. I am truly a novice programmer on a steep learning curve.
Any advice anyone can offer on the concise and correct way to achieve my aim is much appreciated
Ex.
p.s. I am sorry for those that find the question tedious :0)
Last edited: