From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Help me about Djgpp Date: Mon, 08 Sep 1997 00:24:30 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 23 Message-ID: <341345BE.22A8@cs.com> References: <01bcbaee$70d4ac60$0100007f AT padrino> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk moabdib wrote: > > How I can to execute a DOS command under DJGPP???? Use the system() function, which under DJGPP 2.01 recognizes internal DOS commands and calls command.com to execute them. Example: system( "dir" ); To redirect the input or output from DOS commands, use the popen()/pclose() functions (q.v.). hth -- --------------------------------------------------------------------- | John M. Aldrich | "Sex should be friendly. Otherwise | | aka Fighteer I | stick to mechanical toys; it's more | | mailto:fighteer AT cs DOT com | sanitary." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------