HI,
How to execute any DOS command like"print abc.txt" in a C program
friendz help me ? awating 4 u r answers....
Thank u in advance !
Printable View
HI,
How to execute any DOS command like"print abc.txt" in a C program
friendz help me ? awating 4 u r answers....
Thank u in advance !
Hi,
I am also beginner in C, but this should work as I see:
#include <stdlib.h>
#include <stdio.h>
int main()
{
printf("Your command\n");
system("print abc.txt");
return 0;
}
system() function can help to execute your commands
If you want to capture the output of the command, redirect the output of the command into a file, then open that file, or look into the POSIX function popen().