delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/07/09:36:33

Date: Sun, 7 Sep 1997 16:33:54 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: moabdib <moabdib AT arrakis DOT es>
cc: djgpp AT delorie DOT com
Subject: Re: Help me about Djgpp
In-Reply-To: <01bcbaee$70d4ac60$0100007f@padrino>
Message-ID: <Pine.SUN.3.91.970907163110.2698A-100000@is>
MIME-Version: 1.0

On 6 Sep 1997, moabdib wrote:

> How I can to execute a DOS command under DJGPP????

Use the library function `system'.  For example:

	#include <stdlib.h>
	....
	int status = system ("dir *.c > cfiles.lst");
	if (status != 0)
	   fprintf (stderr, "Error %d while running "DIR\n", status);

For more details about `system', see its docs in the libc reference (type 
"info libc alpha system" from the DOS prompt).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019