c - Can't call system with white space in parameter -
i'm trying make system call work. it works in case there no space in address, doesn't work if there's space in address...
this call copies file 1 place another.
how escape space in code properly?
char buffer[300]; snprintf(buffer, sizeof(buffer), "copy %s\\%s %s", assistpath, apifilename, path); system(buffer);
space matter? why don't try code?
snprintf(buffer, sizeof(buffer), "copy \"%s\\%s\" \"%s\"", assistpath, apifilename, path);
Comments
Post a Comment