Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Chris Faylor Date: Wed, 26 Jul 2000 16:01:14 -0400 To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Problem with system() Message-ID: <20000726160114.A27683@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from Glenn.Davis@predictive.com on Wed, Jul 26, 2000 at 03:56:42PM -0400 On Wed, Jul 26, 2000 at 03:56:42PM -0400, Glenn DOT Davis AT predictive DOT com wrote: >Hi, >I am trying to run a simple program that just uses the system() call, but >I can't get it to work. >the call I am using is system("dir"); > >Am I doing something wrong? "dir" is not a cygwin command. It's a function of your command shell. You probably want to do one of: - system ("ls"); /* The cygwin way */ - system ("command /c dir"); /* Windows 95 */ - system ("cmd /c dir"); /* Windows NT */ cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com