Message-Id: <3.0.6.32.19990728155751.00859240@dce03.ipt.br> X-Sender: csrabak AT dce03 DOT ipt DOT br X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Wed, 28 Jul 1999 15:57:51 -0300 To: djgpp AT delorie DOT com From: "Cesar S. Rabak" Subject: Re: getting all filename in sub-directory In-Reply-To: References: <933148163 DOT 6501 AT www DOT remarq DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 13:31 28/07/99 +0300, you wrote: > >On Tue, 27 Jul 1999, Clemens Valens wrote: > >> About your system() command, you could do it as >> >> char show_files[] = "dir *.exe /s > exe_files.txt"; >> system(show_files); > >Or, even better: > > FILE *fp = popen ("dir *.exe /s", "rt"); > fread (fp, ...); > Eli, but in this case the popen would prefer to use the "dir.exe" in DJGPP/BIN, wouldn't? If so, it will not honor the /s switch, but write in fp, something like "No /s: no such file or directory (ENOENT). Cesar