I have a large number of folders (say, m) in a directory and each one of them has n1, n2, ..., nm numbers of text files. I have to perform a mathematical operation on these text files which will result in a number. The names of the folders/text files are arbitrarily chosen.
How to tell Mathematica to do this mathematical operation on all the text files in a single step, such that the final o/p is a table having first column same as the name of the folder, second column name of the text file and third column the o/p of the mathematical operation on the corresponding file.
I tried the functions like FileNames, which gives the list of text files in folder but no success in figuring out the way to use these folder names as variable to run all the files in one go. Will appreciate any suggestion. Thanks