Hello everybody!
I am trying to create folder's which will contain files and lastly all these files will contain texts.
My problem is that am not able to create this folder into a specific location or pathname!!!
Here is the code, please advice accordingly:
#include<stdio.h>
#include<sys/stat.h>
int main() {
int i;
//char pathname = "E:\Visual C\test";
char dirname[50];
for(i=0;i<10;i++) {
sprintf(dirname,"test%d",i);
if((mkdir(dirname,00777))==-1) {
fprintf(stdout,"error in creating dir\n");
}
}
}
Thanks