Loop through each file in folders and sub folders

loop
studio

#1

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


#2

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