From: Clemens Valens Newsgroups: comp.os.msdos.djgpp Subject: Re: getting all filename in sub-directory Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here X-Originating-Host: 195.154.148.69 X-Wren-Trace: cI+oiJ2P07GZy9utn8PO1MXcz9rQ35bD2NDA3d/Cz4/R0JrA0JrOz9La08TXltybwJWCjJ3eq6eDksGCkMqIlMTMgYs= Message-ID: <933148163.6501@www.remarq.com> References: <7nliit$uvc$1 AT nnrp1 DOT deja DOT com> Lines: 19 Date: Tue, 27 Jul 1999 23:49:19 -0800 NNTP-Posting-Host: 10.0.3.195 X-Complaints-To: wrenabuse AT remarq DOT com X-Trace: WReNphoon3 933148458 10.0.3.195 (Wed, 28 Jul 1999 00:54:18 PDT) NNTP-Posting-Date: Wed, 28 Jul 1999 00:54:18 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Take a look at the readdir() function and its header file. The help for this function contains an example that might get you started. About your system() command, you could do it as char show_files[] = "dir *.exe /s > exe_files.txt"; system(show_files); This would list all .exe files in all subdirectories in the file exe_file. This you can easily modify to change the extension on runtime. Clemens * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!