how to get all files from folder and subfolders in c#

98

get all files in all subdirectories c# -

 Directory.GetFiles(dirPath, "*", SearchOption.AllDirectories)

c# list all files in a directory and subdirectory -

string[] allfiles = Directory.GetFiles("path/to/dir", "*.*", SearchOption.AllDirectories);

list all files in directory and subdirectories c# -

string[] entries = Directory.GetFileSystemEntries(path, "*", SearchOption.AllDirectories);

Comments

Submit
0 Comments