Newsgroups: comp.os.msdos.djgpp From: koehler AT netcom DOT com (Koehler) Subject: How to get file-globbed names? Message-ID: Organization: Netcom On-Line Services Date: Wed, 8 Apr 1998 23:17:46 GMT Lines: 39 Sender: koehler AT netcom13 DOT netcom DOT com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Could some kind person please provide me with a djgpp code example where the names of multiple ("globbed") files are sequentially processed..... Or could someone point me to a (simple!!!!) dos version of grep. For example, the program I envision would enclude the following: /*** * eat all files */ while(morefiles()) { /*** * Get current filename into string fileS */ GetCurFile(fileS); /*** * Open and do whatever */ fPF = fopen(fileS,"r"); /*** * do what ever */ ...... /*** * close and report what ever */ fclose(fPF); printf("File %s had ....\n",fileS); } I basicly want a dos grep. If someone can make the above code work under djgpp, I'll use the example and write it myself. I looked at the faq entry about name globbing, but didn't see anything about how to actually deal with the resulting multiple files; i.e. how to get the file names, opened files, etc.. Thanks in advance for any help Ryan Koehler p.s. please reply via email to koehler AT trpntech DOT com