using System;
using System.IO;
public class GetFilesTest {
public static void Main() {
// make a reference to a directory
DirectoryInfo di = new DirectoryInfo("c:\\");
// get a reference to each file in that directory
FileInfo[] fiArr = di.GetFiles();
// print out the names of the files
foreach (FileInfo fri in fiArr)
Console.WriteLine(fri.Name);
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment