Review the code snippet before inserting it on your project.
ArrayList filenamesList = new ArrayList(); DirectoryInfo dir = new DirectoryInfo(@"C:\"); FileInfo[] filesList = dir.GetFiles(); foreach (FileInfo fileInfo in filesList) { string filename = patchFileInfo.FullName; filenamesList.Add(filename); }
With from Barcelona