Loop through each file in folders and sub folders



Hi I want to loop through each file in a folder and sub folder and sub folder. I do not have all the files in just one folder. I am able to loop through each file if they are located in just one folder but how to fetch file infor that is in 2-3 levels of sub folders ?

Directory.getfiles(“Path”) only loops through the specified folders


You can check files in specified directory by Directory.getfiles(“Path”) and also check directories by method Directory.GetDirectories(“Path”).