Rename a file with FAT system

I work with RCM4300 , and I make a function to upload a resource file on rabbit core , but I wish rename the old file for backup before update.
In FAT library I not found a function to rename , or duplicate a file in FAT.
How can I do that ?

Thanks for help.

Yup, it’s a problem that only occurs on FAT formatted drives, as they are case preserving but not case sensitive. The file browser compares the name you’re changing the file to all the names of the files in the folder to make sure you aren’t duplicating the name. Since it is not case sensitive, it counts the former name of the file as the same as the current name, and claims you’re duplicating the name.

It seems like it should be an easy fix.


I haven’t used the Dynamic C FAT file system, but it look slike you can do a rename by calling fat_Split(file, 0L, );

split will not work properly, according to the post here

Bill Sprouse’s responce is:

"The fat_Split function does not shift or retain any data for the newly created file, only the original file has content after the split. It is only used to retain pre-allocated clusters (or reserved space) of the original file, not the data. This would require shifting and re-writting of all the data in the file. You would need to write the code to move the desired data from the original file to a new file. "