Mail Archives: djgpp/1998/02/09/09:40:29
On Mon, 9 Feb 1998, Angelo Maffia wrote:
> I need to know please how i can execute a dos command in my c-programs, i.e.
> a file batch.
Use the library function `system', like this:
#include <stdlib.h>
...
int status = system ("mybatch");
This will look for a batch file `mybatch.bat' in the current directory,
then along the PATH, and if found, will run it.
You should read the documentation of `system' in the library reference,
before using it.
- Raw text -