4
$\begingroup$

I'm trying to import a file, and for that I'm using the following code:

Import["C:\\Users\\William Wallace\\Desktop\\Ivo\\ISEG\\Séries Temporais\\TSA-Cryer and Chan\\Datasets\\hours.dat"]

and I get the warning "Import::nffil: File not found during Import.". However, I'm sure the file is at that directory...

If I move the file for example and try this instead

Import["D:\\hours.dat"]

I'm now able to import the data. So, what is the problem?

Any help would be appreciated.

$\endgroup$

closed as off-topic by m_goldberg, user9660, Öskå, ubpdqn, Yves Klett Feb 10 '16 at 6:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, Community, Öskå, ubpdqn
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ What OS / version? Your path name is not above the 256-character mark, so it shouldn't be too long for Windows to handle. I wonder if the é character is the troublemaker here. Could you temporarily rename your path to remove the special character, out of curiosity? Alternatively, can you import other files from the same directory? $\endgroup$ – MarcoB Feb 9 '16 at 15:23
  • 2
    $\begingroup$ @george2079 - a quicker way to nail down if that is the problem would be FileNames["C:\\Users\\William Wallace\\Desktop\\Ivo\\ISEG"] and see how the Séries Temporais folder name is displayed $\endgroup$ – Jason B. Feb 9 '16 at 15:26
  • 1
    $\begingroup$ Another approach to this is to evaluate SystemDialogInput["FileOpen"] and navigate to the file in the system dialog, and review the string that gets returned. $\endgroup$ – george2079 Feb 9 '16 at 15:32
  • 1
    $\begingroup$ @Anoldmaninthesea.: If you found a solution which works with the help of other users comments it would be appreaciated if you self-answer your question and accept it. For a good answer you even might get some additional reputation... $\endgroup$ – Albert Retey Feb 9 '16 at 17:51
  • 1
    $\begingroup$ @JasonB Regarding the Insert -> File Path, so the picture you linked is not from your own system? Because I can clearly see the File Path option there, right under Horizontal Line :-) $\endgroup$ – MarcoB Feb 9 '16 at 21:32
3
$\begingroup$

Well, after reading the comment by george2079, and removing the 'é' character, the import command still returned the same error. So, I decided to remove also the '-' from the 'TSA - Cryer and Chan' folder, and it worked.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.