using ruby how to get number of files in a given Directory,the file count should include count from recursive directories.
Eg: folder1(2 files) -----> folder2(4 files)
Please try:
//we suppose that the variable folder1 is an absolute path here pattern = File.join(folder1, "**", "*") count = Dir.glob(pattern).count