I have a lot of files. Each of them contains data. I can gladly import one file into Mathematica. But there are over 500 hundred files. I do it like this:
Import["~/math/third_ks/mixed_matrices/1.dat", "Table"];
aaaa = %
(*OUTPUT - some data, I can access them!*)
All I want to do is just create a circle (I can do this), but I can’t change the file name - 1.dat. I want to change it.
I tried to make such a decision. I created part of the possible names, and I wrote them in a separate file.
Import["~/math/third_ks/mixed_matrices/generate_name_of_files.dat", "Table"];
aaaa = %
Output: {{"~/math/third_ks/mixed_matrices/0.dat"}, \
{"~/math/third_ks/mixed_matrices/1.dat"}, ......
All I want to do is Table[a=Import[aaaa[[i]] ,{i,1,500}]
But the function Importaccepts only String"" objects as the file / path name.
source
share