I need to sort file names in alphanumeric descending order. I have written the following code In C, but it's sorting in alphabetic only order I guess as file A2 is read before A11. I am using scandir with alphasort
Thanks for the help
struct dirent **vl_lecture = NULL;
DIR *vl_repertoire = NULL;
//I open the directory with opendir
vl_repertoire = opendir(vg_alias_rep_fichier.arr);
...//code
int n = scandir(vg_alias_rep_fichier.arr,&vl_lecture, NULL, alphasort);
// I use while to perform some operations with file names ...