How can I create a file/folder in Windows using a C program under a given user?
For example, if I have to make something in Desktop "C:\Users(user)\Desktop"
I'm using a system call in C, so I have to substitute the user for the actual username, how can I do that?
int b = 1; char mkdir[33] = "MKDIR Desktop\\"; sprintf(mkdir, "MKDIR Desktop\\%i", b); system(mkdir);
But instead of creating a file at Desktop it continues in the current directory and creates a file called Desktop?