you can use code with asterisk on linux for sure, windows has other
capabilities...
Use System.IO.Directory class to obtain array of filenames (depending on the
pattern).
Usage looks like
string[] files = System.IO.Directory.GetFiles("C:\\uo", "*.txt");2009/8/25 Programmer <[email protected]> > > string filename = "C:\\uo\\E.txt"; > long linecount = 0; > using (StreamReader sr = new StreamReader(filename)) > { > string line; > while ((line = sr.ReadLine()) != null) > { > linecount++; > } > } > MessageBox.Show(linecount.ToString()); > > i want to give general path in string filename. like i would like to > count all .txt file records . > > any ideas. > > eg: string filename = "C:\\uo\\*.txt" i need something like this >
