How can a make a directory in by writing c++ code and transfer files made by me in c++ to that directory

-----------sorry double post..............ignore this

u can try this

char cmd[100];
strcpy(cmd, "mkdir ");
strcat(cmd, dirName);
system(cmd);

strcpy(cmd, "mv ");
strcat(cmd, fileName);
strcat(cmd, " ");
strcat(cmd, dirName);
strcat(cmd, "\\");
strcat(cmd, fileName);
system(cmd);

Correct if I am wrong somewhere.
My point is u can use the system() function for your purpose.

thanks for this informative topic. i like it very much but i am new in this field so i have no much experience about this.

char cmd[100];
strcpy(cmd, "mkdir ");
strcat(cmd, dirName);
system(cmd);

strcpy(cmd, "mv ");
strcat(cmd, fileName);
strcat(cmd, " ");
strcat(cmd, dirName);
strcat(cmd, "/");/********..........CORRECTION IN HERE....*/
strcat(cmd, fileName);
system(cmd);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.