"Kentor" <> wrote:
# I know I can use the system function to execute commands, but I need
# to pass parameters to it and it doesn't want to accept them...
# is there a way to do system("mv %s temp123", myvar) ?
# or maybe there's another function that accepts parameters?
# thanks for your help.
More specifically, you can do things like
static char F[] = "mv %s temp123";
char f[sizeof F+strlen(myvar)+1];
sprintf(f,F,myvar);
int rc = system(f);
--
SM Ryan
http://www.rawbw.com/~wyrmwif/
I have no idea what you just said.
I get that alot.