Click to See Complete Forum and Search --> : [RESOLVED] find files in a folder.


toraj58
November 29th, 2008, 09:20 AM
how to get the name of all files with .aspx extension in a specific folder and save them in some place like array or database or just show them in the page.

dannystommen
December 1st, 2008, 05:34 AM
DirectoryInfo dir = new DirectoryInfo("C:/temp");
FileInfo[] files = dir.GetFiles("*.aspx");
foreach (FileInfo fi in files) {
//do something with your file
}

toraj58
December 2nd, 2008, 02:21 AM
thanks, it was helpful.