View Full Version : search for a string in a file in c#

01-18-2012, 02:01 PM
I want to build an application. the inputs are as follows.

There are multiple files in a folder. Initially, there is a file parent.txt that contains list of some file names which are in th same folder. These files, with any extensions, are called by syntax CALL "abc.txt" or may be CALL "xyz.c". Corresponding file is opened. This abc or xyz file inturn may call several other files with the same syntax as mentioned above which hav to be opened and searched for the CALL stmnts. Thus the nesting of files may go to any level, files being called internally. 1 file may hav any no of CALL statements. In all, parsing for the CALL stmnts should be completed for all the list of files in the parent file.

Please help me as to how this can be done in c#.net iterativly, since a file can have many CALL statements, and called those files will again have many CALL stmnts. A little bit of logical help needed.

Thank You