priyankpatel 0 Newbie Poster

hi all,

i am trying to run a command from shell and it is running fine but if i am trying to run the same command using system function then its not working.

about the command: this command is used to transfer file from one machine to another.

please find the below code...

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    char str[256],buf[256];
    sprintf(buf,"/gp/bin/UCP /gp/data/PlanDuplicator/aaa.txt  // mrengine00/tmp/aaa.txt");
    system(buf);

    return 0;
}

please help me in this issue...

Thnaks in advance... :)