(In order to Enlarge images Please Right Click and Open images in New Tab).
Let’s see how to read all file names exists in perticular directory
string downloadpath = @”C:\\1″;
DirectoryInfo dir = new DirectoryInfo(downloadpath);
var files = dir.GetFiles(“*.*”);
foreach (var file in files)
FilesInfo obj = new FilesInfo();
obj.FileName = file.Name;