Somehow the spawnvp function doesn't like the second parameter (>). Any ideas how to solve this?
Thanks in advance,
MonsterOutput: Bad parameter >Code:#include <stdio.h> #include <string.h> #include <process.h> #include <errno.h> int main(void) { char *my_args[5]; my_args[0] = "ping"; my_args[1] = "125.125.125.125"; my_args[2] = ">"; my_args[3] = "c:\\output.txt"; my_args[4] = NULL; if(spawnvp(P_WAIT, my_args[0], my_args) == -1) { puts(strerror(errno)); } getchar(); return 0; }