A couple of great programmers made some SF libraries that sound like they would do the job your looking at;
SDFileSystem Version 4.1.4 - The latest version of the SDFileSystem module. Now includes support for multiple files, copying and truncating files, SDHC high capacity cards and FAT32 as well as FAT16. Format command also added to format a card from scratch.
Database - A simple module to implement reading and writing records from/to a SD or MMC card, using the SDFileSystem Module.