# importing a file with asterisk in its name (Linux machines)

I am trying to import a file:

filename = "furan.b3lyp.6-31G*.sdat"
path = "/home/molkee/Desktop/plots/scr/" <> filename;
FileExistsQ[path]
data = Import[path, "Table"];


I am getting the Recursion Limit error. I guess this happens because of the asterisk in the filename, but why?

What is going on? What is the right way to import it?

FILE

-
MMA is interpreting * to mean a wildcard (placeholder for 0 or more characters). I'm not on a Linux machine (Windows doesn't allow * in filenames) so I can't test this, but "furan.b3lyp.6-31G" <> Verbatim["*"] <> ".sdat" might work. Or Verbatim around the whole thing. –  mfvonh Jun 18 '14 at 17:59
Is possible to "escape" the star in a filename using a special character? \ or something? –  molkee Jun 18 '14 at 18:11
Oh right I didn't think about that. Probably: try \\* –  mfvonh Jun 18 '14 at 18:11
@molkee Works like a charm for me, see here. –  Öskå Jun 18 '14 at 18:18
I can confirm this, redhat linux, mma 9.0.1 With my own very simple file. Open fails as well so it is not to do with Import. The workaround is to not use * in linux file names ( seriously this is bad for other reasons ) –  george2079 Jun 18 '14 at 19:55