Rename file or directory.
FRESULT f_rename ( const char* OldName, /* Pointer to old file/directory name */ const char* NewName /* Pointer to new file/directory name */ );
Rename a file or directory and can move it to other directory. Logical drive number is determined by old name, new name must not contain logical drive number. This function is not supported in read-only configuration or minimization level of >= 1.
Note: In this revision, moving any directory to other directory collapses the FAT structure on the disk.
// Rename file or directory f_rename("oldname.txt", "newname.txt"); // Rename and move file to other directory simultaneously f_rename("oldname.txt", "dir1/newname.txt");