generating function that estimates all the positions in data files inside a directory (and subdirectories) and save the results.