# Applying a formula to the data in several files [duplicate]

I am calculating with the depth data recorded in a number of files with extension .log.

The depth data is like this and I loaded it by means of Mathematica:

Import["C:\\Homeworks\\depth\\file1.log"]

{"2016/01/13 00:00:30", 42, 754}, {"2016/01/13 00:01:00", 42, 754},
{"2016/01/13 00:01:30", 42, 753}, {"2016/01/13 00:02:00", 42, 752},
{"2016/01/13 00:02:30", 42, 753}, {"2016/01/13 00:03:00", 42, 754}


I succeed in obtaining the depth data and transforming it into 42.754, 42.754, 42.753, 42.752, 42.753, 42.754, etc.

However, this only processes the data in one file. However, I have in my folder a group of about 10 files. How can I read in all the data in a folder in an easier way than to do it individually?

• Look at the docs for FileNames[ ] , Map[ ] and perhaps Flatten[ ___,1]. Voting to close. – Dr. belisarius Feb 11 '16 at 1:51

Table[Import[i], {i, FileNames["C:\\Homeworks\\depth\\file*.log"]}]