Hi, I need some help with a little program.
The main problem, is that that PATH is full of .zip files,Code:#include <stdio.h> #include <dirent.h> main() { DIR *d; struct dirent *dir; char c, *name[100]; int i, cont=0; d = opendir ("C:/Test"); for (i=0; ((dir = readdir (d))!= NULL); i++) { name[i] = strdup (dir-> d_name); cont ++; printf ("C:\\Test\\%s\n", name[i]); } closedir (d); system ("pause"); }
Example File.zip, File2.zip
and I need to create the array, without de .zip extension, so the array would be with the names only,
File, File 2 .... etc...
Is there a way to do that??
Thanks