Avoid error while importing from the same directory?

Good morning/afternoon.

I have a problem. I want to import two .txt files from the same directory in which the program that I am writing is located. However, only one of them is found, apc300000tf500uncertainties4_ft.txt, while apc300000tf500uncertainties4_smolyak1.txt is not. I am attaching a screenshot of the situation in case someone can help me.

Any coment is appreciated.

Regards.
Jaime.

  1. are we sure these files have the .txt extension?

  2. You have a trailing open parenthesis (‘(’), which is causing a syntax error in the cell you’re trying to evaluate.

Yes, i am sure it is a txt file, see first attacehed image, even though it is in spanish you can see that the extension is txt.

About the parenthesis, you are right, it is out of place. However it is not the source of the error. My code still does not recognize the second table.

Can you upload a .zip file of this entire directory so others can see exactly what you’re working with?

Are both files returned by:

FileNames["*.txt", Directory[]]

And if so, does:

file=Part[FileNames["*.txt", Directory[]],1];
Import[file]

and so on for each position (presumably there will be two based on your screenshot) work?

Btw, using file names like “a.txt” or “b.txt” would be kinder for demonstration purposes here.