Use the DirectoryInfo class. DirectoryInfo di = new DirectoryInfo(path); FileSystemInfo[] fi = di.GetFileSystemInfos(); fi contains a list of all the folders and files in the directory represented by path. Now you can traverse through that list. Consult MSDN on DirectoryInfo class for further details
------------- The primary aim of AI is to make programming languages understand how frustrating it is to program them