having here several files in ASCII format
I want to import, while removing headers and footers and then join the several lists.
strm = OpenRead[".omf"]
Skip[strm, Record, 38, NullRecords -> True];
mydata = ReadList[strm, Number, 7500*3, RecordLists -> True]
Close[strm];
This correctly removes headers and footers, so I don't know to combine this to a
alldata = Map[Import[ ], FileNames[]]
like command to import all files in the directory.
data = Import[#, "Table", HeaderLines -> 38, NumData -> 7500*3,
AllNumeric -> False, TrailerLines -> 2] & /@ FileNames[]
This works for importing all files, but the footers (or trailers?) are not removed, output:
{{ 755205.327 391367.272 126872.268},{ 638270.884 407054.202 408065.135},{ 621838.43 593464.262 -26779.3974},{ 792199.887 301929.715 -144422.249},{ 827047.904 221093.933 -81909.9342},<<7493>>,{ 638270.884 407054.202 408065.135},
{ 755205.327 391367.272 126872.268},{# End: Data Text},{# End: Segment}}
HeaderLines isn't even mentioned in the Math7.0 Doc. In principle I only need the 3 column in every single .omf file
column3 = mydata[[All, 3]];
and those columns from every single file should than be arranged to a columnlenght X filenumber matrix list. Is it possible to apply this already when doing Import or OpenRead to save memory as this is just a example and the real files will be in the 2 digit GB range? Thanks for your tips